aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-11 05:26:21 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-11 05:26:21 +0000
commitfe5bab74a7fa849f112726d813c03d70dc2ae386 (patch)
tree4e2faff0576492a6e37a6220cdabe6725f05ec45 /app.c
parentc326cbbceeb5bc26fc0df1b06de3204eb8be1fa6 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.2@7970 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rw-r--r--app.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/app.c b/app.c
index 998135fb5..95347a27e 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;
}