[svn-commits] twilson: branch 1.8 r290542 - /branches/1.8/res/res_rtp_asterisk.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 5 23:35:55 CDT 2010


Author: twilson
Date: Tue Oct  5 23:35:51 2010
New Revision: 290542

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=290542
Log:
Don't try to send RTP when remote_address is null

It is possible for ast_rtp_stop() to be called which will clear the remote
address and cause the sendto to fail and spam warnings. Don't send in this
case.

Modified:
    branches/1.8/res/res_rtp_asterisk.c

Modified: branches/1.8/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_rtp_asterisk.c?view=diff&rev=290542&r1=290541&r2=290542
==============================================================================
--- branches/1.8/res/res_rtp_asterisk.c (original)
+++ branches/1.8/res/res_rtp_asterisk.c Tue Oct  5 23:35:51 2010
@@ -1945,6 +1945,11 @@
 
 	ast_rtp_instance_get_remote_address(instance1, &remote_address);
 
+	if (ast_sockaddr_isnull(&remote_address)) {
+		ast_debug(1, "Remote address is null, most likely RTP has been stopped\n");
+		return 0;
+	}
+
 	/* Send the packet back out */
 	res = rtp_sendto(instance1, (void *)rtpheader, len, 0, &remote_address);
 	if (res < 0) {




More information about the svn-commits mailing list