[asterisk-commits] file: branch 1.4 r59195 - in /branches/1.4: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 23 18:39:45 MST 2007


Author: file
Date: Fri Mar 23 20:39:44 2007
New Revision: 59195

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59195
Log:
Merged revisions 59194 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r59194 | file | 2007-03-23 21:35:49 -0400 (Fri, 23 Mar 2007) | 2 lines

Only try to handle a response if it has a response code.

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_sip.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=59195&r1=59194&r2=59195
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Mar 23 20:39:44 2007
@@ -14609,20 +14609,20 @@
 			ast_set_flag(req, SIP_PKT_IGNORE);
 			ast_set_flag(req, SIP_PKT_IGNORE_RESP);
 			append_history(p, "Ignore", "Ignoring this retransmit\n");
-		}
-	
-		e = ast_skip_blanks(e);
-		if (sscanf(e, "%d %n", &respid, &len) != 1) {
-			ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
-		} else {
-			if (respid <= 0) {
-				ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid);
-				return 0;
+		} else if (e) {
+			e = ast_skip_blanks(e);
+			if (sscanf(e, "%d %n", &respid, &len) != 1) {
+				ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
+			} else {
+				if (respid <= 0) {
+					ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid);
+					return 0;
+				}
+				/* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
+				if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
+					extract_uri(p, req);
+				handle_response(p, respid, e + len, req, ignore, seqno);
 			}
-			/* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
-			if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
-				extract_uri(p, req);
-			handle_response(p, respid, e + len, req, ignore, seqno);
 		}
 		return 0;
 	}



More information about the asterisk-commits mailing list