blob: 97ea61b628f05b78f2d074a7b0aeee926b41bf98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Index: channels/chan_sip.c
===================================================================
--- a/channels/chan_sip.c (Revision 291226)
+++ b/channels/chan_sip.c (Arbeitskopie)
@@ -18329,8 +18329,6 @@
if (r->call)
r->call = dialog_unref(r->call, "unsetting registry->call pointer-- case 200");
p->registry = registry_unref(p->registry, "unref registry entry p->registry");
- /* Let this one hang around until we have all the responses */
- sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
/* p->needdestroy = 1; */
/* set us up for re-registering
@@ -18374,6 +18372,8 @@
expires_ms -= EXPIRY_GUARD_SECS * 1000;
if (sipdebug)
ast_log(LOG_NOTICE, "Outbound Registration: Expiry for %s is %d sec (Scheduling reregistration in %d s)\n", r->hostname, expires, expires_ms/1000);
+ /* Let this one hang around until we have all the responses */
+ sip_scheddestroy(p, (expires_ms > ((p->timer_t1 != 0) ? p->timer_t1 : global_t1) * 64) ? DEFAULT_TRANS_TIMEOUT : (expires_ms - 1000));
r->refresh= (int) expires_ms / 1000;
|