diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-21 23:28:20 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-21 23:28:20 +0000 |
commit | 302005b303a417b90ae858a99239921b9d4d77d5 (patch) | |
tree | 445f57995ad5183a25321f0dbda511871768cc82 /channels | |
parent | 5bdbf2e7e8150bfe7d0be6fffdea25d9951e102f (diff) |
Merged revisions 151428 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r151428 | mmichelson | 2008-10-21 18:27:45 -0500 (Tue, 21 Oct 2008) | 14 lines
If a peer uses any transport other than UDP, then MWI will
fail for that peer since sip_alloc will allocate a sip_pvt with
a default transport of UDP. This change resets the socket type
immediately after allocating the sip_pvt in sip_send_mwi_from_peer,
so that the proceeding call to create_addr_from_peer does not fail
right away. The socket data from the peer is properly copied to
the sip_pvt in create_addr_from_peer.
(closes issue #13710)
Reported by: andrew53
Patches:
sip_notify_use_tcp.patch uploaded by andrew53 (license 519)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@151430 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 46b390301..cc43e7320 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -19573,6 +19573,11 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer, const struct ast_event *e /* Build temporary dialog for this message */ if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY))) return -1; + /* If we don't set the socket type to 0, then create_addr_from_peer will fail immediately if the peer + * uses any transport other than UDP. We set the type to 0 here and then let create_addr_from_peer copy + * the peer's socket information to the sip_pvt we just allocated + */ + p->socket.type = 0; if (create_addr_from_peer(p, peer)) { /* Maybe they're not registered, etc. */ dialog_unlink_all(p, TRUE, TRUE); |