aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authortwisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-06 06:43:32 +0000
committertwisted <twisted@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-06 06:43:32 +0000
commita1fd51cc75771d2fb03895b0f03ab03833943c50 (patch)
tree83ccc8754650246720df64e1dfd20c18e148c9d1 /file.c
parentafedd1cb91ec56e4c7d0f681a827ab37b2ba5d17 (diff)
Don't crash when pause/stop keys aren't defined on the command line (Bug #3514)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4970 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'file.c')
-rwxr-xr-xfile.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/file.c b/file.c
index f0761b15e..85e66a781 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);