debuglog: fix segment logging.

StreamSegmentForEach returns the number of segments or < 0 in case
of error. This patch synchronizes debuglog output module with this
behaviour.
remotes/origin/master-1.1.x
Eric Leblond 15 years ago committed by Victor Julien
parent 3644e90a2c
commit 1596241687

@ -299,7 +299,7 @@ TmEcode AlertDebugLogIPv4(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq
ret = StreamSegmentForEach(p, flag, ret = StreamSegmentForEach(p, flag,
AlertDebugPrintStreamSegmentCallback, AlertDebugPrintStreamSegmentCallback,
(void *)aft); (void *)aft);
if (ret != 1) { if (ret < 0) {
SCMutexUnlock(&aft->file_ctx->fp_mutex); SCMutexUnlock(&aft->file_ctx->fp_mutex);
return TM_ECODE_FAILED; return TM_ECODE_FAILED;
} }

Loading…
Cancel
Save