[asterisk-commits] file: trunk r218918 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 16 13:31:51 CDT 2009
Author: file
Date: Wed Sep 16 13:31:47 2009
New Revision: 218918
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218918
Log:
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.
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=218918&r1=218917&r2=218918
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Sep 16 13:31:47 2009
@@ -18703,7 +18703,6 @@
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 @@
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 (ack_res == FALSE) {
- append_history(p, "Ignore", "Ignoring this retransmit\n");
- return;
+ if (p->socket.type == SIP_TRANSPORT_UDP) {
+ int ack_res;
+
+ /* 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 */
More information about the asterisk-commits
mailing list