[Asterisk-cvs] asterisk/channels chan_iax2.c,1.133,1.134
markster at lists.digium.com
markster at lists.digium.com
Wed Apr 28 18:01:21 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv12063/channels
Modified Files:
chan_iax2.c
Log Message:
Fix potential seg in iax2 from reload when registrations are going
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- chan_iax2.c 28 Apr 2004 04:23:14 -0000 1.133
+++ chan_iax2.c 28 Apr 2004 22:07:59 -0000 1.134
@@ -6076,8 +6076,18 @@
for (reg = registrations;reg;) {
regl = reg;
reg = reg->next;
- if (regl->expire > -1)
+ if (regl->expire > -1) {
ast_sched_del(sched, regl->expire);
+ }
+ if (regl->callno) {
+ /* XXX Is this a potential lock? I don't think so, but you never know */
+ ast_mutex_lock(&iaxsl[regl->callno]);
+ if (iaxs[regl->callno]) {
+ iaxs[regl->callno]->reg = NULL;
+ iax2_destroy_nolock(regl->callno);
+ }
+ ast_mutex_unlock(&iaxsl[regl->callno]);
+ }
free(regl);
}
registrations = NULL;
More information about the svn-commits
mailing list