aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/call.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-10-02 12:30:06 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-10-02 12:34:34 +0200
commit1a4a08386c28ae76339386c5bd7e3be34cf9d9ff (patch)
treedb7ea2bed837c9cce273abb22f8b454b68d9a06c /src/common/call.c
parent3f2f0fdd8c1118ec0431c7768f8f5a240a067e77 (diff)
Only dial if call is on-hook or disconnected
Diffstat (limited to 'src/common/call.c')
-rw-r--r--src/common/call.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/call.c b/src/common/call.c
index 63832bf..2b40ca4 100644
--- a/src/common/call.c
+++ b/src/common/call.c
@@ -633,7 +633,7 @@ dial_after_hangup:
case CALL_CONNECT:
case CALL_DISCONNECTED:
if (c > 0) {
- if (c == 'h' || c == 'd') {
+ if (c == 'h' || (c == 'd' && call.state == CALL_DISCONNECTED)) {
PDEBUG(DCALL, DEBUG_INFO, "Call hangup\n");
call_new_state(CALL_IDLE);
if (call.callref) {
@@ -655,7 +655,7 @@ dial_after_hangup:
sprintf(text, "call active: %s (press h=hangup)\r", call.station_id);
}
if (call.state == CALL_DISCONNECTED)
- sprintf(text, "call disconnected: %s (press h=hangup)\r", cause_name(call.disc_cause));
+ sprintf(text, "call disconnected: %s (press h=hangup d=redial)\r", cause_name(call.disc_cause));
break;
}
/* skip if nothing has changed */