Reset app layer events when we start inspecting a new TX

pull/412/merge
Victor Julien 13 years ago
parent 28a6c1d9f8
commit 72e35efbc6

@ -366,6 +366,13 @@ static inline int AppLayerDecoderEventsIsEventSet(AppLayerDecoderEvents *devents
return 0; return 0;
} }
#define AppLayerDecoderEventsResetEvents(devents) \
do { \
if ((devents) != NULL) { \
(devents)->cnt = 0; \
} \
} while (0)
#define AppLayerDecoderEventsFreeEvents(devents) \ #define AppLayerDecoderEventsFreeEvents(devents) \
do { \ do { \
if ((devents) != NULL) { \ if ((devents) != NULL) { \

@ -1028,16 +1028,12 @@ static int DetectDnsQueryTest07(void) {
printf("(p3) sig 2 didn't alert, but it should have: "); printf("(p3) sig 2 didn't alert, but it should have: ");
goto end; goto end;
} }
/* VJ currently we when we reset de_state we reset AMATCH too, /** \todo should not alert, bug #839
* this resets app-layer-event matching as well. However, we
* are not clearing/reseting app events, so we match over and
* over again */
#if 0
if (PacketAlertCheck(p3, 3)) { if (PacketAlertCheck(p3, 3)) {
printf("(p3) sig 3 did alerted, but it should not have: "); printf("(p3) sig 3 did alert, but it should not have: ");
goto end; goto end;
} }
#endif */
result = 1; result = 1;
end: end:

Loading…
Cancel
Save