From: Josh Roberson Date: Sun, 6 Feb 2005 06:43:32 +0000 (+0000) Subject: Don't crash when pause/stop keys aren't defined on the command line (Bug #3514) X-Git-Tag: 1.2.0-beta1~1251 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ec6b2a3589eb05bfcd46539927d8707b24d0980;p=thirdparty%2Fasterisk.git Don't crash when pause/stop keys aren't defined on the command line (Bug #3514) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4970 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/file.c b/file.c index f0761b15ef..85e66a781d 100755 --- a/file.c +++ b/file.c @@ -995,6 +995,14 @@ char ast_waitstream_fr(struct ast_channel *c, const char *breakon, const char *f { int res; struct ast_frame *fr; + + if (!breakon) + breakon = ""; + if (!forward) + forward = ""; + if (!rewind) + rewind = ""; + while(c->stream) { res = ast_sched_wait(c->sched); if ((res < 0) && !c->timingfunc) { @@ -1059,6 +1067,9 @@ char ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd int outfd; struct ast_frame *fr; struct ast_channel *rchan; + + if (!breakon) + breakon = ""; while(c->stream) { ms = ast_sched_wait(c->sched);