]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a spot where a function could return without bringing
authorMark Michelson <mmichelson@digium.com>
Wed, 30 Jul 2008 18:31:47 +0000 (18:31 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 30 Jul 2008 18:31:47 +0000 (18:31 +0000)
a channel out of autoservice.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134475 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/app.c

index c9fdb4f0c7eb954809fcb5dc0171123ae3f431d9..bad03e09b69823e17cb9c429c8a4a25d52288c52 100644 (file)
@@ -227,8 +227,12 @@ int ast_dtmf_stream(struct ast_channel *chan, struct ast_channel *peer, const ch
                res = ast_waitfor(chan, 100);
 
        /* ast_waitfor will return the number of remaining ms on success */
-       if (res < 0)
+       if (res < 0) {
+               if (peer) {
+                       ast_autoservice_stop(peer);
+               }
                return res;
+       }
 
        if (ast_opt_transmit_silence) {
                silgen = ast_channel_start_silence_generator(chan);