json-email-common: can now log same header twice

Multiple events can be applied on a transaction so we may need to
log the same header twice.

The HDR_IS_LOGGED flag was making it impossible. And this system
is usless as email application layer is transaction based.
pull/1699/head
Eric Leblond 10 years ago committed by Victor Julien
parent af6d1dddfa
commit 484885b70f

@ -270,7 +270,6 @@ json_t *JsonEmailLogJsonData(const Flow *f, void *state, void *vtx, uint64_t tx_
json_object_set_new(sjs, "status",
json_string(MimeDecParseStateGetStatus(mime_state)));
if ((entity->header_flags & HDR_IS_LOGGED) == 0) {
MimeDecField *field;
//printf("email LOG\n");
@ -305,8 +304,6 @@ json_t *JsonEmailLogJsonData(const Flow *f, void *state, void *vtx, uint64_t tx_
}
}
entity->header_flags |= HDR_IS_LOGGED;
if (mime_state->stack == NULL || mime_state->stack->top == NULL || mime_state->stack->top->data == NULL)
SCReturnPtr(NULL, "json_t");
@ -368,7 +365,6 @@ json_t *JsonEmailLogJsonData(const Flow *f, void *state, void *vtx, uint64_t tx_
// FLOWLOCK_UNLOCK(p->flow);
SCReturnPtr(sjs, "json_t");
}
}
json_decref(sjs);
// FLOWLOCK_UNLOCK(p->flow);

@ -33,9 +33,6 @@
#include "util-base64.h"
#include "util-debug.h"
/* Header Flags */
#define HDR_IS_LOGGED 1
/* Content Flags */
#define CTNT_IS_MSG 1
#define CTNT_IS_ENV 2

Loading…
Cancel
Save