diff --git a/app.c b/app.c index 2f3ac6cd7bcfb836ae069c9476e79530f39ed7e8..f041bd323aafa3d0a7d802ea829c57328e99a88f 100755 --- a/app.c +++ b/app.c @@ -472,8 +472,9 @@ int ast_control_streamfile(struct ast_channel *chan, char *file, char *fwd, char if (res == -1) break; + /* if we get one of our stop chars, return it to the calling function */ if (stop && strchr(stop, res)) { - res = 0; + /* res = 0; */ break; } } diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c index 850ebed9ccf470b2ea23928f13394781b2d1dc67..2ec8de1b648ecbaa1cf2eaa7fb3c798c3dea09e0 100755 --- a/apps/app_controlplayback.c +++ b/apps/app_controlplayback.c @@ -107,6 +107,11 @@ static int controlplayback_exec(struct ast_channel *chan, void *data) res = ast_control_streamfile(chan, file, fwd, rev, stop, pause, skipms); LOCAL_USER_REMOVE(u); + + /* If we stopped on one of our stop keys, return 0 */ + if(stop && strchr(stop, res)) + res = 0; + return res; }