diff options
author | Terry Wilson <twilson@digium.com> | 2010-10-06 04:47:57 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2010-10-06 04:47:57 +0000 |
commit | feea367f89756ebdd931f4c9ff97f3a9cf355aeb (patch) | |
tree | 765e4224e8b70b0bceed1c257b5f10e2c7d697c6 /res | |
parent | ae6e8ecfd2ac83e1e20010474c6f609388cb1fc6 (diff) |
Merged revisions 290542 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r290542 | twilson | 2010-10-05 21:35:51 -0700 (Tue, 05 Oct 2010) | 6 lines
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.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_rtp_asterisk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index ffd7b2596..72032de60 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -1945,6 +1945,11 @@ static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, unsigned int 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) { |