[svn-commits] twilson: branch 10 r369215 - in /branches/10: ./ channels/chan_sip.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Jun 22 14:35:03 CDT 2012
Author: twilson
Date: Fri Jun 22 14:34:59 2012
New Revision: 369215
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369215
Log:
Don't crash on a guest directmedia call
A sip_pvt may not have relatedpeer set if a call doesn't match up
with a peer. If there is no relatedpeer, there is no direct media
ACL to apply, so just return that it is allowed.
........
Merged revisions 369214 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/channels/chan_sip.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_sip.c?view=diff&rev=369215&r1=369214&r2=369215
==============================================================================
--- branches/10/channels/chan_sip.c (original)
+++ branches/10/channels/chan_sip.c Fri Jun 22 14:34:59 2012
@@ -30091,6 +30091,12 @@
ast_rtp_instance_get_remote_address(p1->rtp, &them);
ast_rtp_instance_get_local_address(p1->rtp, &us);
+ /* If p2 is a guest call, there will be no peer. If there is no peer, there
+ * is no directmediaha, so go ahead and allow it */
+ if (!p2->relatedpeer) {
+ return res;
+ }
+
if ((res = ast_apply_ha(p2->relatedpeer->directmediaha, &them)) == AST_SENSE_DENY) {
const char *us_addr = ast_strdupa(ast_sockaddr_stringify(&us));
const char *them_addr = ast_strdupa(ast_sockaddr_stringify(&them));
More information about the svn-commits
mailing list