summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorz3bra <contactatz3bradotorg>2016-11-25 16:22:15 +0100
committerz3bra <contactatz3bradotorg>2016-11-25 16:22:15 +0100
commitb0571c7aabe1874c7180ec340ad3901967acbe0d (patch)
tree3fadfd8ce93b709e4adbcfb741059c0c525bc630
parent2a1638db2e7e390d7d87d45169692cdc01b33048 (diff)
Hang up only when we're in TRANSMITTING mode
When f->av.state equals TRANSMITTING, it means that we're neither receiving, nor sending data, thus, we can cancel the call. This doesn't apply to RINGING mode because this state is possible when someone calls us, and we didn't answer yet.
-rw-r--r--ratox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ratox.c b/ratox.c
index 010c887..6bf8e38 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1668,7 +1668,7 @@ loop(void)
f->fd[FCALL_OUT] = fd;
}
- if (!(f->av.state & INCOMING) && !(f->av.state & OUTGOING))
+ if (f->av.state == TRANSMITTING)
cancelcall(f, "Hung up");
if (f->av.state & RINGING) {