]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
code cleanup - indentation fix
authorAnoop Saldanha <poonaatsoc@gmail.com>
Fri, 20 Apr 2012 05:27:11 +0000 (10:57 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 24 Apr 2012 11:50:34 +0000 (13:50 +0200)
src/detect.c

index 0b11a1e01ed7c6283cb61389d2295cf79ee4fa2d..7e97984445c0217dc88aea521affff3eed21834d 100644 (file)
@@ -1555,37 +1555,30 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
                     uint8_t pmq_idx = 0;
                     StreamMsg *smsg_inspect = smsg;
                     for ( ; smsg_inspect != NULL; smsg_inspect = smsg_inspect->next, pmq_idx++) {
-                        //if (det_ctx->smsg_pmq[pmq_idx].pattern_id_array_cnt == 0) {
-                        //    SCLogDebug("no match in smsg_inspect %p (%u), idx %d", smsg_inspect, smsg_inspect->data.data_len, pmq_idx);
-                        //    continue;
-                        //}
-
-                        //if (det_ctx->smsg_pmq[pmq_idx].pattern_id_bitarray != NULL) {
-                            /* filter out sigs that want pattern matches, but
-                             * have no matches */
-                            if ((s->flags & SIG_FLAG_MPM_STREAM) && !(s->flags & SIG_FLAG_MPM_STREAM_NEG) &&
-                                !(det_ctx->smsg_pmq[pmq_idx].pattern_id_bitarray[(s->mpm_pattern_id_div_8)] & s->mpm_pattern_id_mod_8)) {
-                                SCLogDebug("no match in this smsg");
-                                continue;
-                            }
-
-                            if (DetectEngineInspectStreamPayload(de_ctx, det_ctx, s, p->flow, smsg_inspect->data.data, smsg_inspect->data.data_len) == 1) {
-                                SCLogDebug("match in smsg %p", smsg);
-                                pmatch = 1;
-                                /* Tell the engine that this reassembled stream can drop the
-                                 * rest of the pkts with no further inspection */
-                                if (s->action & ACTION_DROP)
-                                    alert_flags |= PACKET_ALERT_FLAG_DROP_FLOW;
-
-                                /* store ptr to current smsg */
-                                if (alert_msg == NULL) {
-                                    alert_msg = smsg_inspect;
-                                    p->alerts.alert_msgs = smsg;
-                                }
+                        /* filter out sigs that want pattern matches, but
+                         * have no matches */
+                        if ((s->flags & SIG_FLAG_MPM_STREAM) && !(s->flags & SIG_FLAG_MPM_STREAM_NEG) &&
+                            !(det_ctx->smsg_pmq[pmq_idx].pattern_id_bitarray[(s->mpm_pattern_id_div_8)] & s->mpm_pattern_id_mod_8)) {
+                            SCLogDebug("no match in this smsg");
+                            continue;
+                        }
 
-                                break;
+                        if (DetectEngineInspectStreamPayload(de_ctx, det_ctx, s, p->flow, smsg_inspect->data.data, smsg_inspect->data.data_len) == 1) {
+                            SCLogDebug("match in smsg %p", smsg);
+                            pmatch = 1;
+                            /* Tell the engine that this reassembled stream can drop the
+                             * rest of the pkts with no further inspection */
+                            if (s->action & ACTION_DROP)
+                                alert_flags |= PACKET_ALERT_FLAG_DROP_FLOW;
+
+                            /* store ptr to current smsg */
+                            if (alert_msg == NULL) {
+                                alert_msg = smsg_inspect;
+                                p->alerts.alert_msgs = smsg;
                             }
-                        //}
+
+                            break;
+                        }
                     }
 
                 } /* if (smsg != NULL) */