aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-25 04:23:48 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-25 04:23:48 +0000
commitea9919cce032d97a9b2ca8cb67a254f9fde4b895 (patch)
treec973b7e4096e349e05f59e19a52c34e659826118 /channel.c
parent2b13cc6d3e7e6b78fcbf76715f796be94f4e5690 (diff)
ensure that spy frame queueing is able to deal with translation failing for any reason (issue #6546)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@11058 f38db490-d61c-443f-a65b-d21fe96a405b
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 190c4a310..5aacefd21 100644
--- a/channel.c
+++ b/channel.c
@@ -1164,7 +1164,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);