[asterisk-commits] mmichelson: trunk r168976 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 16 16:43:09 CST 2009
Author: mmichelson
Date: Fri Jan 16 16:43:09 2009
New Revision: 168976
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168976
Log:
Merged revisions 168975 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r168975 | mmichelson | 2009-01-16 16:42:13 -0600 (Fri, 16 Jan 2009) | 18 lines
Account for possible NULL pointer when we receive a 408 in response to a REGISTER
It may be that by the time we receive a reply to a REGISTER request, the attempt has
timed out and thus the registry structure pointed to by the corresponding sip_pvt has
gone away. This situation was handled properly for a 200 OK response, but the 408
case assumed that the sip_registry struct was non-NULL, thus potentially causing a crash
This commit fixes this assumption and prints out a message to the console if we should
receive a late 408 response to a REGISTER
(closes issue #14211)
Reported by: aborghi
Patches:
14211.diff uploaded by putnopvut (license 60)
Tested by: aborghi
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=168976&r1=168975&r2=168976
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jan 16 16:43:09 2009
@@ -16884,7 +16884,11 @@
break;
case 408: /* Request timeout */
/* Got a timeout response, so reset the counter of failed responses */
- r->regattempts = 0;
+ if (r) {
+ r->regattempts = 0;
+ } else {
+ ast_log(LOG_WARNING, "Got a 408 response to our REGISTER on call %s after we had destroyed the registry object\n", p->callid);
+ }
break;
case 423: /* Interval too brief */
r->expiry = atoi(get_header(req, "Min-Expires"));
More information about the asterisk-commits
mailing list