git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-11-21 13:04:36 +00:00
parent b39076b985
commit f367620dd9
2 changed files with 9 additions and 2 deletions

View File

@@ -1,4 +1,8 @@
2005-11-20 Russell Bryant <russell@digium.com>
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>
* Makefile apps/Makefile: Fix 'make install' for Solaris. (issue #5775)

View File

@@ -859,10 +859,11 @@ static int iax2_getpeername(struct sockaddr_in sin, char *host, int len, int loc
{
struct iax2_peer *peer;
int res = 0;
if (lockpeer)
ast_mutex_lock(&peerl.lock);
peer = peerl.peers;
while(peer) {
while (peer) {
if ((peer->addr.sin_addr.s_addr == sin.sin_addr.s_addr) &&
(peer->addr.sin_port == sin.sin_port)) {
ast_copy_string(host, peer->name, len);
@@ -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);
if (ast_test_flag(peer, IAX_TEMPONLY))
destroy_peer(peer);
res = 1;
}
}
return res;
}