[Asterisk-cvs] asterisk pbx.c,1.154.2.10,1.154.2.11
russell at lists.digium.com
russell at lists.digium.com
Sun May 15 19:21:06 CDT 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv19068
Modified Files:
Tag: v1-0
pbx.c
Log Message:
protect ResponseTimeout and DigitTimeout apps from crashing when called in non-PBX channels (bug #4092)
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.154.2.10
retrieving revision 1.154.2.11
diff -u -d -r1.154.2.10 -r1.154.2.11
--- pbx.c 15 May 2005 16:42:25 -0000 1.154.2.10
+++ pbx.c 15 May 2005 23:26:29 -0000 1.154.2.11
@@ -4619,6 +4619,10 @@
static int pbx_builtin_rtimeout(struct ast_channel *chan, void *data)
{
+ /* If the channel is not in a PBX, return now */
+ if (!chan->pbx)
+ return 0;
+
/* Set the timeout for how long to wait between digits */
chan->pbx->rtimeout = atoi((char *)data);
if (option_verbose > 2)
@@ -4628,6 +4632,10 @@
static int pbx_builtin_dtimeout(struct ast_channel *chan, void *data)
{
+ /* If the channel is not in a PBX, return now */
+ if (!chan->pbx)
+ return 0;
+
/* Set the timeout for how long to wait between digits */
chan->pbx->dtimeout = atoi((char *)data);
if (option_verbose > 2)
More information about the svn-commits
mailing list