main/asterisk: preliminary fix for issue 18119

Testing fix for SIP reregistration issue in Asterisk.
This commit is contained in:
Timo Teräs 2010-10-12 16:43:33 +03:00
parent 82edb551f7
commit 3846ca64a4
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,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;

View File

@ -2,7 +2,7 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=asterisk
pkgver=1.6.2.13
pkgrel=0
pkgrel=1
pkgdesc="Asterisk: A Module Open Source PBX System"
url="http://www.asterisk.org/"
license="GPL"
@ -18,6 +18,7 @@ source="http://downloads.digium.com/pub/asterisk/releases/$pkgname-$pkgver.tar.g
100-uclibc-daemon.patch
101-caps-uclibc.patch
400-bug-227.patch
500-issue18119.patch
asterisk.initd
asterisk.confd
asterisk.logrotate"
@ -123,6 +124,7 @@ md5sums="1e184a4d9301e2e4b9de3bc98b507d4f asterisk-1.6.2.13.tar.gz
b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch
6e1129e30c4fd2c25c86c81685a485a9 101-caps-uclibc.patch
79e9634b5054bceb3b8dc246654bb243 400-bug-227.patch
f104ec9a337fb77c67c65aedad75fa0f 500-issue18119.patch
0ce3219e05f55af884a7dc6b99c2b276 asterisk.initd
ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd
3e65172275684373e1a25c8a11224411 asterisk.logrotate"