aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-10 20:38:54 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-10 20:38:54 +0000
commit1f19c7ed5beeacd22acd78dc9ac57132c89ea4f9 (patch)
tree96f6918e3c421970d92165354eece34830556ed5 /channels
parent3d23ec83e345e67bac8a297897b8a262fa33b637 (diff)
Do not allocate SIP pvt's for PEERs we can not reach.
This was seen as a lot of dialogs being created then immediately destroyed at reload/restart of the SIP channel. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@63748 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1924c406a..85981ee46 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11563,6 +11563,10 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer)
struct sip_pvt *p;
int newmsgs, oldmsgs;
+ /* Do we have an IP address? If not, skip this peer */
+ if (!peer->addr.sin_addr.s_addr && !peer->defaddr.sin_addr.s_addr)
+ return 0;
+
/* Check for messages */
ast_app_messagecount(peer->mailbox, &newmsgs, &oldmsgs);