mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
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
This commit is contained in:
11
file.c
11
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);
|
||||
|
Reference in New Issue
Block a user