aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-16 19:24:31 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-16 19:24:31 +0000
commit1c07f160817205263df6705d393aa113706d99dd (patch)
tree56eab36864ab6f41618e319768e33db9754c6736 /channels/chan_sip.c
parent90b158ff8841304d135c073a8c22e927917e09cf (diff)
Merged revisions 218918 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r218918 | file | 2009-09-16 13:31:47 -0500 (Wed, 16 Sep 2009) | 5 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.1@218932 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3e979a46a..a9f885175 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -16911,7 +16911,6 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
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);
@@ -16927,16 +16926,20 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
if (owner)
owner->hangupcause = hangup_sip2cause(resp);
- /* 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 */