-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)
{
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);
ast_copy_string(host, peer->name, len);
if (ast_test_flag(peer, IAX_TEMPONLY))
destroy_peer(peer);
+ res = 1;
}
}
+
return res;
}