From fbee1f0ed762f4d721532b003b572339d0a21dc8 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 11 Jan 2006 05:26:21 +0000 Subject: [PATCH] don't override an error condition that occurred when acting on the primary channel when stopping the autoservice on the peer channel. (from issue #6087) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7970 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- app.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app.c b/app.c index 998135fb57..95347a27e5 100644 --- a/app.c +++ b/app.c @@ -316,8 +316,12 @@ int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digi } } } - if (peer) - res = ast_autoservice_stop(peer); + if (peer) { + /* Stop autoservice on the peer channel, but don't overwrite any error condition + that has occurred previously while acting on the primary channel */ + if (ast_autoservice_stop(peer) && !res) + res = -1; + } } return res; }