From e2dcbeda0c06b8937afaf0092c87b16a45b76f44 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Fri, 19 Oct 2007 16:38:29 +0000 Subject: [PATCH] When returning a DTMF digit from ast_control_streamfile cast it as a char so that 0 does not overlap with the success return code. (closes issue #11023) Reported by: cfc git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86502 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/app.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/app.c b/main/app.c index c84bd0f54c..9136175ca7 100644 --- a/main/app.c +++ b/main/app.c @@ -449,6 +449,10 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file, break; } + /* If we are returning a digit cast it as char */ + if (res > 0 || chan->stream) + res = (char)res; + ast_stopstream(chan); return res;