fix http http transaction id update. Update transactions as soon as we receive a callback on new request

remotes/origin/master-1.1.x
Anoop Saldanha 14 years ago committed by Victor Julien
parent ed69eeab14
commit 41d71a6d70

@ -303,18 +303,6 @@ static int HTPHandleRequestData(Flow *f, void *htp_state,
HtpState *hstate = (HtpState *)htp_state;
/* if the previous run set the new request flag, we unset it here. As
* we're here after a new request completed, we know it's a new
* transaction. So we set the new transaction flag. */
if (hstate->flags & HTP_FLAG_NEW_REQUEST) {
hstate->flags &=~ HTP_FLAG_NEW_REQUEST;
/* new transaction */
hstate->transaction_cnt++;
SCLogDebug("transaction_cnt %"PRIu16", list_size %"PRIuMAX, hstate->transaction_cnt,
(uintmax_t)list_size(hstate->connp->conn->transactions));
}
/* On the first invocation, create the connection parser structure to
* be used by HTP library. This is looked up via IP in the radix
* tree. Failing that, the default HTP config is used.
@ -799,7 +787,10 @@ static int HTPCallbackRequest(htp_connp_t *connp) {
SCReturnInt(HOOK_ERROR);
}
hstate->flags |= HTP_FLAG_NEW_REQUEST;
hstate->transaction_cnt++;
SCLogDebug("transaction_cnt %"PRIu16", list_size %"PRIuMAX,
hstate->transaction_cnt,
(uintmax_t)list_size(hstate->connp->conn->transactions));
SCLogDebug("HTTP request completed");

@ -46,10 +46,6 @@
#define HTP_FLAG_NEW_BODY_SET 0x10 /**< Flag to indicate that HTTP
has parsed a new body (for
pcre) */
#define HTP_FLAG_NEW_REQUEST 0x20 /**< Flag to indicate that we have
a new HTTP requesta and we
need to log it */
enum {
HTP_BODY_NONE, /**< Flag to indicate the current
operation */

Loading…
Cancel
Save