aboutsummaryrefslogtreecommitdiffstats
path: root/main/app.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-19 16:38:29 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-19 16:38:29 +0000
commit0cf416f926f032e6065553ae605849aad7d3fb24 (patch)
treee20a9fc030bbdd2d00cecddca1a4e4e5b2631163 /main/app.c
parentd16d0f65db522fbfc7d4ab89ecdb0f9913fa5abe (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@86502 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/app.c b/main/app.c
index c84bd0f54..9136175ca 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;