]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fix merge
authorRuss Combs <rucombs@cisco.com>
Mon, 26 Jan 2015 23:01:29 +0000 (18:01 -0500)
committerRuss Combs <rucombs@cisco.com>
Mon, 26 Jan 2015 23:01:29 +0000 (18:01 -0500)
configure.ac
src/detection/tag.cc
src/time/profiler.cc
src/utils/sf_email_attach_decode.h

index 8180d62843a34ce6f24844041f81e145010dc64f..f3a2c7bcc180c617620b8b71cd2e9aa3531a6305 100644 (file)
@@ -124,6 +124,20 @@ AC_CHECK_PROG(have_dblatex,dblatex,yes,no)
 
 AM_CONDITIONAL(MAKE_PDF_DOC, [test "x$have_dblatex" = "xyes" -a "x$have_asciidoc" = "xyes"])
 
+AC_MSG_CHECKING(for sparc)
+if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
+    AC_DEFINE([WORDS_MUSTALIGN],[1],[Define if words must align])
+    AC_MSG_RESULT(yes)
+
+    # gcc, sparc and optimization not so good
+    if test -n "$GCC"; then
+        NO_OPTIMIZE="yes"
+    fi
+else
+    AC_MSG_RESULT(no)
+fi
+
+
 #--------------------------------------------------------------------------
 # visibility foo
 #--------------------------------------------------------------------------
index be2f68b9ef652441ae920e2c83188f90d17aa822..795f61e7ee7b9f9f5b8453fba5033cbc57913e62 100644 (file)
@@ -111,8 +111,8 @@ static THREAD_LOCAL uint32_t last_prune_time = 0;
 static THREAD_LOCAL uint32_t tag_alloc_faults = 0;
 static THREAD_LOCAL uint32_t tag_memory_usage = 0;
 
-static bool s_exclusive = false;
-static unsigned s_sessions = 0;
+static THREAD_LOCAL bool s_exclusive = false;
+static THREAD_LOCAL unsigned s_sessions = 0;
 
 // TBD when tags leverage sessions, tag nodes can be freed at end
 // of session.  then we can configure this to allow multiple
index 0fee05309c6c8cb4692ba184f8e71a3e0d87f80d..bcdd466fd869bc058aeca9ad8204e1efa0eb87e0 100644 (file)
@@ -168,7 +168,7 @@ void ResetRuleProfiling(void)
     {
         otn = (OptTreeNode *)hashNode->data;
         {
-            rtn = getRtnFromOtn(otn, policyId);
+            rtn = getRtnFromOtn(otn);
             if (rtn == NULL)
                 continue;
 
index b21a21a2dc603675727690e235ac1855ee55f57d..42d776f6fdf771cda7e7bcf55d2598c9055dae3f 100644 (file)
@@ -42,23 +42,23 @@ typedef enum {
 
 } DecodeType;
 
-typedef struct s_Base64_DecodeState
+struct Base64_DecodeState
 {
     uint32_t encode_bytes_read;
     uint32_t decode_bytes_read;
     int encode_depth;
     int decode_depth;
-} Base64_DecodeState;
+};
 
-typedef struct s_QP_DecodeState
+struct QP_DecodeState
 {
     uint32_t encode_bytes_read;
     uint32_t decode_bytes_read;
     int encode_depth;
     int decode_depth;
-} QP_DecodeState;
+};
 
-typedef struct s_UU_DecodeState
+struct UU_DecodeState
 {
     uint32_t encode_bytes_read;
     uint32_t decode_bytes_read;
@@ -66,15 +66,15 @@ typedef struct s_UU_DecodeState
     int decode_depth;
     uint8_t begin_found;
     uint8_t end_found;
-} UU_DecodeState;
+};
 
-typedef struct s_BitEnc_DecodeState
+struct BitEnc_DecodeState
 {
     uint32_t bytes_read;
     int depth;
-} BitEnc_DecodeState;
+};
 
-typedef struct s_Email_DecodeState
+struct Email_DecodeState
 {
     DecodeType decode_type;
     uint8_t decode_present;
@@ -89,7 +89,14 @@ typedef struct s_Email_DecodeState
     UU_DecodeState uu_state;
     BitEnc_DecodeState bitenc_state;
 
-} Email_DecodeState;
+};
+
+struct MimeStats
+{
+    uint64_t memcap_exceeded;
+    uint64_t attachments[DECODE_ALL];
+    uint64_t decoded_bytes[DECODE_ALL];
+};
 
 typedef struct _MimeStats
 {