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 14 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,
AlertDebugPrintStreamSegmentCallback,
(void *)aft);
if (ret != 1) {
if (ret < 0) {
SCMutexUnlock(&aft->file_ctx->fp_mutex);
return TM_ECODE_FAILED;
}

Loading…
Cancel
Save