[asterisk-commits] russell: branch 1.4 r183559 - /branches/1.4/channels/chan_iax2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Mar 20 11:53:28 CDT 2009
Author: russell
Date: Fri Mar 20 11:53:25 2009
New Revision: 183559
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=183559
Log:
Fix a crash in IAX2 registration handling found during load testing with dvossel.
Modified:
branches/1.4/channels/chan_iax2.c
Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=183559&r1=183558&r2=183559
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Fri Mar 20 11:53:25 2009
@@ -5819,15 +5819,20 @@
ast_device_state_changed("IAX2/%s", p->name); /* Activate notification */
return_unref:
- ast_string_field_set(iaxs[callno], peer, peer);
- /* Choose lowest expiry number */
- if (expire && (expire < iaxs[callno]->expiry))
- iaxs[callno]->expiry = expire;
+ if (iaxs[callno]) {
+ ast_string_field_set(iaxs[callno], peer, peer);
+
+ /* Choose lowest expiry number */
+ if (expire && (expire < iaxs[callno]->expiry)) {
+ iaxs[callno]->expiry = expire;
+ }
+ }
res = 0;
- if (p)
+ if (p) {
peer_unref(p);
+ }
return res;
}
More information about the asterisk-commits
mailing list