summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2006-02-25 04:32:21 +0000
committerKevin P. Fleming <kpfleming@digium.com>2006-02-25 04:32:21 +0000
commit50765d9aa5e6d4edf95d48f572c38c2c3b9d1967 (patch)
tree8b862cce27a325e85febd6b20be1a366e02d32c9 /channel.c
parent9e2f19ee8e2849e92746d5c4a6997f7d67610eb7 (diff)
Merged revisions 11058 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11058 | kpfleming | 2006-02-24 22:23:48 -0600 (Fri, 24 Feb 2006) | 2 lines ensure that spy frame queueing is able to deal with translation failing for any reason (issue #6546) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index c5bff1255..72bf9ae8d 100644
--- a/channel.c
+++ b/channel.c
@@ -1213,7 +1213,12 @@ static void queue_frame_to_spies(struct ast_channel *chan, struct ast_frame *f,
trans->last_format = f->subclass;
}
}
- translated_frame = ast_translate(trans->path, f, 0);
+ if (!(translated_frame = ast_translate(trans->path, f, 0))) {
+ ast_log(LOG_ERROR, "Translation to %s failed, dropping frame for spies\n",
+ ast_getformatname(AST_FORMAT_SLINEAR));
+ ast_mutex_unlock(&spy->lock);
+ break;
+ }
}
for (last = queue->head; last && last->next; last = last->next);