[asterisk-commits] file: branch group/sip-object-matching r178100 - /team/group/sip-object-match...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 23 14:11:54 CST 2009
Author: file
Date: Mon Feb 23 14:11:53 2009
New Revision: 178100
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=178100
Log:
Only peer and friends get to be considered when searching based on IP address.
Modified:
team/group/sip-object-matching/channels/chan_sip.c
Modified: team/group/sip-object-matching/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/sip-object-matching/channels/chan_sip.c?view=diff&rev=178100&r1=178099&r2=178100
==============================================================================
--- team/group/sip-object-matching/channels/chan_sip.c (original)
+++ team/group/sip-object-matching/channels/chan_sip.c Mon Feb 23 14:11:53 2009
@@ -23676,7 +23676,7 @@
peer = build_peer(cat, gen, ast_variable_browse(ucfg, cat), 0, FALSE);
if (peer) {
ao2_t_link(peers, peer, "link peer into peer table");
- if (peer->addr.sin_addr.s_addr) {
+ if ((peer->type & SIP_TYPE_PEER) && peer->addr.sin_addr.s_addr) {
ao2_t_link(peers_by_ip, peer, "link peer into peers_by_ip table");
}
@@ -23740,7 +23740,7 @@
peer = build_peer(cat, ast_variable_browse(cfg, cat), NULL, 0, is_peer == 2);
if (peer) {
ao2_t_link(peers, peer, "link peer into peers table");
- if (peer->addr.sin_addr.s_addr) {
+ if ((peer->type & SIP_TYPE_PEER) && peer->addr.sin_addr.s_addr) {
ao2_t_link(peers_by_ip, peer, "link peer into peers_by_ip table");
}
unref_peer(peer, "unref the result of the build_peer call. Now, the links from the tables are the only ones left.");
More information about the asterisk-commits
mailing list