[Asterisk-cvs] asterisk/apps app_queue.c,1.169,1.170
markster
markster
Tue Oct 18 17:04:23 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv8285/apps
Modified Files:
app_queue.c
Log Message:
Fix segfault in app queue when no cdr exists for the calling channel (bug #5462)
Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -d -r1.169 -r1.170
--- app_queue.c 17 Oct 2005 22:26:33 -0000 1.169
+++ app_queue.c 18 Oct 2005 20:58:16 -0000 1.170
@@ -2188,8 +2188,14 @@
which = peer;
if (monitorfilename)
ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1 );
- else
+ else if (qe->chan->cdr)
ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1 );
+ else {
+ /* Last ditch effort -- no CDR, make up something */
+ char tmpid[256];
+ snprintf(tmpid, sizeof(tmpid), "chan-%x", rand());
+ ast_monitor_start(which, qe->parent->monfmt, tmpid, 1 );
+ }
if (qe->parent->monjoin)
ast_monitor_setjoinfiles(which, 1);
}
More information about the svn-commits
mailing list