From: Victor Julien Date: Mon, 22 Apr 2013 09:03:32 +0000 (+0200) Subject: Suppress warnings when StreamSegmentForEach is called for UDP or SCTP, unless debug... X-Git-Tag: suricata-2.0beta1~160 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00948882e7e59b41982a0d5705428e41773579e2;p=thirdparty%2Fsuricata.git Suppress warnings when StreamSegmentForEach is called for UDP or SCTP, unless debug is compiled in. --- diff --git a/src/stream.c b/src/stream.c index 6bb43dfea7..aec247e760 100644 --- a/src/stream.c +++ b/src/stream.c @@ -232,12 +232,14 @@ int StreamSegmentForEach(Packet *p, uint8_t flag, StreamSegmentCallback Callback case IPPROTO_TCP: return StreamTcpSegmentForEach(p, flag, CallbackFunc, data); break; +#ifdef DEBUG case IPPROTO_UDP: SCLogWarning(SC_ERR_UNKNOWN_PROTOCOL, "UDP is currently unsupported"); break; default: SCLogWarning(SC_ERR_UNKNOWN_PROTOCOL, "This protocol is currently unsupported"); break; +#endif } return 0; }