From b0571c7aabe1874c7180ec340ad3901967acbe0d Mon Sep 17 00:00:00 2001 From: z3bra Date: Fri, 25 Nov 2016 16:22:15 +0100 Subject: 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. --- ratox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ratox.c') 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) { -- cgit v1.2.3