aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-11-11 05:55:32 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-11-11 05:55:32 +0100
commitce2bb8ec43e7df5af9e1f2d6b36c23d1cfffbb35 (patch)
treedc327d9aab89242ec2c9376ea82a42dbab9402ea
parente9583d56615256f3d365aace1f02ae99361111c7 (diff)
Fixup call control split
-rw-r--r--src/common/call.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/call.c b/src/common/call.c
index 53c0886..c1e6c86 100644
--- a/src/common/call.c
+++ b/src/common/call.c
@@ -510,16 +510,21 @@ void call_up_release(int callref, int cause)
process = get_process(callref);
if (process) {
- /* just keep MNCC connection it tones shall be sent.
+ /* just keep MNCC connection if tones shall be sent.
* no tones while setting up / alerting the call. */
- if (send_patterns && !process->state == PROCESS_SETUP_RO && !process->state == PROCESS_ALERTING_RO)
+ if (send_patterns
+ && process->state != PROCESS_SETUP_RO
+ && process->state != PROCESS_ALERTING_RO)
disconnect_process(callref, cause);
else
+ /* if no tones shall be sent, release on disconnect
+ * or RO setup states */
if (process->state == PROCESS_DISCONNECT
|| process->state == PROCESS_SETUP_RO
|| process->state == PROCESS_ALERTING_RO) {
destroy_process(callref);
_indicate_disconnect_release(callref, cause, 0);
+ /* if no tones shall be sent, disconnect on all other states */
} else {
disconnect_process(callref, cause);
_indicate_disconnect_release(callref, cause, 1);