mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
don't crash on undefined keys (bug #3514)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
file.c
11
file.c
@@ -984,6 +984,14 @@ char ast_waitstream_fr(struct ast_channel *c, char *breakon, char *forward, char
|
|||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
struct ast_frame *fr;
|
struct ast_frame *fr;
|
||||||
|
|
||||||
|
if (!breakon)
|
||||||
|
breakon = "";
|
||||||
|
if (!forward)
|
||||||
|
forward = "";
|
||||||
|
if (!rewind)
|
||||||
|
rewind = "";
|
||||||
|
|
||||||
while(c->stream) {
|
while(c->stream) {
|
||||||
res = ast_sched_wait(c->sched);
|
res = ast_sched_wait(c->sched);
|
||||||
if ((res < 0) && !c->timingfunc) {
|
if ((res < 0) && !c->timingfunc) {
|
||||||
@@ -1049,6 +1057,9 @@ char ast_waitstream_full(struct ast_channel *c, char *breakon, int audiofd, int
|
|||||||
struct ast_frame *fr;
|
struct ast_frame *fr;
|
||||||
struct ast_channel *rchan;
|
struct ast_channel *rchan;
|
||||||
|
|
||||||
|
if (!breakon)
|
||||||
|
breakon = "";
|
||||||
|
|
||||||
while(c->stream) {
|
while(c->stream) {
|
||||||
ms = ast_sched_wait(c->sched);
|
ms = ast_sched_wait(c->sched);
|
||||||
if ((ms < 0) && !c->timingfunc) {
|
if ((ms < 0) && !c->timingfunc) {
|
||||||
|
Reference in New Issue
Block a user