diff options
author | Joshua Colp <jcolp@digium.com> | 2009-09-16 18:31:47 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2009-09-16 18:31:47 +0000 |
commit | 5c52a7a746fa26a121ec0674230dd1bc327a9ee9 (patch) | |
tree | 88f0d4840f7cd7a7579a31ef9fdc935e1d36d4f3 /channels | |
parent | 077b44c43fd26c85d0cfceb67db15bfa34630b7b (diff) |
On TCP and TLS connections do not attempt to stop retransmission of the packet internally.
This was preventing responses from being properly processed because the packet was not being found
causing handle_response to return prematurely.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6c635252e..f156a457f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18703,7 +18703,6 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc struct ast_channel *owner; int sipmethod; int res = 1; - int ack_res; const char *c = get_header(req, "Cseq"); /* GCC 4.2 complains if I try to cast c as a char * when passing it to ast_skip_nonblanks, so make a copy of it */ char *c_copy = ast_strdupa(c); @@ -18725,16 +18724,20 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc pbx_builtin_setvar_helper(owner, causevar, causeval); } - /* Acknowledge whatever it is destined for */ - if ((resp >= 100) && (resp <= 199)) { - ack_res = __sip_semi_ack(p, seqno, 0, sipmethod); - } else { - ack_res = __sip_ack(p, seqno, 0, sipmethod); - } + if (p->socket.type == SIP_TRANSPORT_UDP) { + int ack_res; - if (ack_res == FALSE) { - append_history(p, "Ignore", "Ignoring this retransmit\n"); - return; + /* Acknowledge whatever it is destined for */ + if ((resp >= 100) && (resp <= 199)) { + ack_res = __sip_semi_ack(p, seqno, 0, sipmethod); + } else { + ack_res = __sip_ack(p, seqno, 0, sipmethod); + } + + if (ack_res == FALSE) { + append_history(p, "Ignore", "Ignoring this retransmit\n"); + return; + } } /* If this is a NOTIFY for a subscription clear the flag that indicates that we have a NOTIFY pending */ |