[svn-commits] file: branch 1.2 r59194 -
/branches/1.2/channels/chan_sip.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri Mar 23 18:35:49 MST 2007
Author: file
Date: Fri Mar 23 20:35:49 2007
New Revision: 59194
URL: http://svn.digium.com/view/asterisk?view=rev&rev=59194
Log:
Only try to handle a response if it has a response code.
Modified:
branches/1.2/channels/chan_sip.c
Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=59194&r1=59193&r2=59194
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Fri Mar 23 20:35:49 2007
@@ -11295,16 +11295,16 @@
/* ignore means "don't do anything with it" but still have to
respond appropriately */
ignore=1;
- }
-
- e = ast_skip_blanks(e);
- if (sscanf(e, "%d %n", &respid, &len) != 1) {
- ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
- } else {
- /* 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);
+ } 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 {
+ /* 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 svn-commits
mailing list