aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-05 01:31:29 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-05 01:31:29 +0000
commit895f3ff9365fcc09151529780abd9853276660e4 (patch)
tree70170562732142a13d46a1829bf425270f94ce85 /channels/chan_sip.c
parent8e25e431691ea4c22342f317b240028286ce23ac (diff)
fix timer T1 handling (issue #5330)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6730 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-xchannels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3fcd1a169..7a9aeb2a3 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -126,7 +126,7 @@ static int default_expiry = DEFAULT_DEFAULT_EXPIRY;
#define DEFAULT_RETRANS 1000 /* How frequently to retransmit */
/* 2 * 500 ms in RFC 3261 */
-#define MAX_RETRANS 7 /* Try only 7 times for retransmissions */
+#define MAX_RETRANS 6 /* Try only 6 times for retransmissions, a total of 7 transmissions */
#define MAX_AUTHTRIES 3 /* Try authentication three times, then fail */
@@ -1142,9 +1142,9 @@ static int retrans_pkt(void *data)
pkt->timer_a = 2 * pkt->timer_a;
/* For non-invites, a maximum of 4 secs */
- if (pkt->method != SIP_INVITE && pkt->timer_a > 4000)
- pkt->timer_a = 4000;
siptimer_a = pkt->timer_t1 * pkt->timer_a; /* Double each time */
+ if (pkt->method != SIP_INVITE && siptimer_a > 4000)
+ siptimer_a = 4000;
/* Reschedule re-transmit */
reschedule = siptimer_a;