[asterisk-commits] rizzo: branch rizzo/astobj2 r47994 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 24 10:34:11 MST 2006


Author: rizzo
Date: Fri Nov 24 11:34:10 2006
New Revision: 47994

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47994
Log:
safety check in parse_request as well.

Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47994&r1=47993&r2=47994
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Fri Nov 24 11:34:10 2006
@@ -4966,6 +4966,11 @@
 	char *c = req->data, **dst = req->header;
 	int i = 0, lim = SIP_MAX_HEADERS - 1;
 
+	if (req->flags & SIP_PKT_PARSED) {
+		ast_log(LOG_WARNING, "sorry, packet already parsed");
+		return;
+	}
+
 	dst[0] = c;
 	req->headers = -1;	/* mark that we are working on the header */
 	for (; *c; c++) {



More information about the asterisk-commits mailing list