Merged revisions 183560 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

................
r183560 | russell | 2009-03-20 12:00:58 -0500 (Fri, 20 Mar 2009) | 10 lines

Merged revisions 183559 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183559 | russell | 2009-03-20 11:53:25 -0500 (Fri, 20 Mar 2009) | 2 lines

Fix a crash in IAX2 registration handling found during load testing with dvossel.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@183562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2009-03-20 17:04:48 +00:00
parent 6a00eba9cb
commit b95912e533

View File

@@ -6467,15 +6467,20 @@ static int register_verify(int callno, struct sockaddr_in *sin, struct iax_ies *
ast_devstate_changed(AST_DEVICE_UNKNOWN, "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;
}