git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Russell Bryant 20 years ago
parent 3245bf61a1
commit 4612b4ccca

@ -1,3 +1,7 @@
2005-11-21 Russell Bryant <russell@digium.com>
* channels/chan_iax2.c (iax2_getpeername): Return non-zero to indicate that a peer was found when using realtime (issue #5815)
2005-11-20 Russell Bryant <russell@digium.com> 2005-11-20 Russell Bryant <russell@digium.com>
* Makefile apps/Makefile: Fix 'make install' for Solaris. (issue #5775) * Makefile apps/Makefile: Fix 'make install' for Solaris. (issue #5775)

@ -859,6 +859,7 @@ static int iax2_getpeername(struct sockaddr_in sin, char *host, int len, int loc
{ {
struct iax2_peer *peer; struct iax2_peer *peer;
int res = 0; int res = 0;
if (lockpeer) if (lockpeer)
ast_mutex_lock(&peerl.lock); ast_mutex_lock(&peerl.lock);
peer = peerl.peers; peer = peerl.peers;
@ -879,8 +880,10 @@ static int iax2_getpeername(struct sockaddr_in sin, char *host, int len, int loc
ast_copy_string(host, peer->name, len); ast_copy_string(host, peer->name, len);
if (ast_test_flag(peer, IAX_TEMPONLY)) if (ast_test_flag(peer, IAX_TEMPONLY))
destroy_peer(peer); destroy_peer(peer);
res = 1;
} }
} }
return res; return res;
} }

Loading…
Cancel
Save