[Asterisk-cvs] asterisk/channels chan_iax.c,1.39,1.40 chan_iax2.c,1.71,1.72
markster at lists.digium.com
markster at lists.digium.com
Thu Nov 13 21:44:48 CST 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv3506/channels
Modified Files:
chan_iax.c chan_iax2.c
Log Message:
Don't try to expire if there is no expirey
Index: chan_iax.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- chan_iax.c 13 Nov 2003 23:49:15 -0000 1.39
+++ chan_iax.c 14 Nov 2003 04:11:03 -0000 1.40
@@ -1594,6 +1594,7 @@
strncpy(p->name, peer, sizeof(p->name) - 1);
p->dynamic = 1;
p->delme = 1;
+ p->expire = -1;
p->capability = iax_capability;
strcpy(p->methods, "md5,plaintext");
}
@@ -3447,7 +3448,8 @@
/* Setup the expirey */
if (p->expire > -1)
ast_sched_del(sched, p->expire);
- p->expire = ast_sched_add(sched, p->expirey * 1000, expire_registry, (void *)p);
+ if (p->expirey)
+ p->expire = ast_sched_add(sched, p->expirey * 1000, expire_registry, (void *)p);
MYSNPRINTF "peer=%s;yourip=%s;yourport=%d;refresh=%d;",
p->name, inet_ntoa(p->addr.sin_addr), ntohs(p->addr.sin_port), p->expirey);
if (p->hascallerid)
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- chan_iax2.c 13 Nov 2003 16:25:52 -0000 1.71
+++ chan_iax2.c 14 Nov 2003 04:11:03 -0000 1.72
@@ -1596,6 +1596,7 @@
strncpy(p->name, peer, sizeof(p->name) - 1);
p->dynamic = 1;
p->delme = 1;
+ p->expire = -1;
p->capability = iax2_capability;
p->authmethods = IAX_AUTH_MD5 | IAX_AUTH_PLAINTEXT;
}
@@ -3568,7 +3569,8 @@
/* Setup the expirey */
if (p->expire > -1)
ast_sched_del(sched, p->expire);
- p->expire = ast_sched_add(sched, p->expirey * 1000, expire_registry, (void *)p);
+ if (p->expirey)
+ p->expire = ast_sched_add(sched, p->expirey * 1000, expire_registry, (void *)p);
iax_ie_append_str(&ied, IAX_IE_USERNAME, p->name);
iax_ie_append_short(&ied, IAX_IE_REFRESH, p->expirey);
iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr);
More information about the svn-commits
mailing list