diff --git a/daemon/Makefile b/daemon/Makefile index af42efe33..b5f4dfcb0 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -32,6 +32,7 @@ CFLAGS+= -DRTPENGINE_VERSION="\"$(RTPENGINE_VERSION)\"" CFLAGS+= -DMP_PLUGIN_DIR="\"/usr/lib/rtpengine\"" #CFLAGS+= -DSRTCP_KEY_DERIVATION_RFC_COMPLIANCE +#CFLAGS+= -DTERMINATE_SDP_AT_BLANK_LINE ifeq ($(DBG),yes) CFLAGS+= -D__DEBUG=1 diff --git a/daemon/sdp.c b/daemon/sdp.c index 1d884396c..2e8e3a517 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -759,6 +759,12 @@ int sdp_parse(str *body, GQueue *sessions) { end = str_end(body); while (b && b < end - 1) { +#ifdef TERMINATE_SDP_AT_BLANK_LINE + if (b[0] == '\n' || b[0] == '\r') { + body->len = b - body->s; + break; + } +#endif errstr = "Missing '=' sign"; if (b[1] != '=') goto error;