int retval = 0;
uint16_t flags = 0;
FileContainer *files = NULL;
- FileContainer *files_opposite = NULL;
const StreamingBufferConfig *sbcfg = NULL;
SCLogDebug("data %p data_len %"PRIu32, data, data_len);
}
files = s->files_tc;
- files_opposite = s->files_ts;
flags = FileFlowToFlags(s->f, STREAM_TOCLIENT);
}
files = s->files_ts;
- files_opposite = s->files_tc;
flags = FileFlowToFlags(s->f, STREAM_TOSERVER);
if ((s->flags & HTP_FLAG_STORE_FILES_TC) ||
sbcfg = &s->cfg->request.sbcfg;
}
- /* if the previous file is in the same txid, we reset the file part of the
- * stateful detection engine. We cannot do that here directly, because of
- * locking order. Flow is locked at this point and we can't lock flow
- * before de_state */
- if (files != NULL && files->tail != NULL && files->tail->txid == txid) {
- SCLogDebug("new file in same tx, flagging http state for de_state reset");
-
- if (direction & STREAM_TOCLIENT) {
- s->flags |= HTP_FLAG_NEW_FILE_TX_TC;
- } else {
- s->flags |= HTP_FLAG_NEW_FILE_TX_TS;
- }
- }
- if (files_opposite != NULL && files_opposite->tail != NULL && files_opposite->tail->txid == txid) {
- SCLogDebug("new file in same tx, flagging http state for de_state reset");
-
- if (direction & STREAM_TOCLIENT) {
- SCLogDebug("flagging TC");
- s->flags |= HTP_FLAG_NEW_FILE_TX_TC;
- } else {
- SCLogDebug("flagging TS");
- s->flags |= HTP_FLAG_NEW_FILE_TX_TS;
- }
- }
-
if (FileOpenFile(files, sbcfg, filename, filename_len,
data, data_len, flags) == NULL)
{
#define HTP_FLAG_STORE_FILES_TC 0x0080
#define HTP_FLAG_STORE_FILES_TX_TS 0x0100
#define HTP_FLAG_STORE_FILES_TX_TC 0x0200
-/** flag the state that a new file has been set in this tx */
-#define HTP_FLAG_NEW_FILE_TX_TS 0x0400
-/** flag the state that a new file has been set in this tx */
-#define HTP_FLAG_NEW_FILE_TX_TC 0x0800
enum {
HTP_BODY_NONE = 0, /**< Flag to indicate the current