]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
don't crash on undefined keys (bug #3514)
authorRussell Bryant <russell@russellbryant.com>
Mon, 7 Feb 2005 04:41:35 +0000 (04:41 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 7 Feb 2005 04:41:35 +0000 (04:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4979 65c4cc65-6c06-0410-ace0-fbb531ad65f3

file.c

diff --git a/file.c b/file.c
index 433edaeab06e85abc2c0d55cfb1ff3004fd4d85e..a1a563c7a8a388d71c549f0f4c781d342bc1ee10 100755 (executable)
--- a/file.c
+++ b/file.c
@@ -984,6 +984,14 @@ char ast_waitstream_fr(struct ast_channel *c, char *breakon, char *forward, char
 {
        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) {
@@ -1048,6 +1056,9 @@ char ast_waitstream_full(struct ast_channel *c, char *breakon, int audiofd, int
        int outfd;
        struct ast_frame *fr;
        struct ast_channel *rchan;
+
+       if (!breakon)
+               breakon = "";
        
        while(c->stream) {
                ms = ast_sched_wait(c->sched);