From 4c3351ec603c8d8b0ea9ad68d627c228149b597d Mon Sep 17 00:00:00 2001 From: sin Date: Wed, 15 Oct 2014 10:24:41 +0100 Subject: Only call toxav_kill_transmission() after toxav_prepare_transmission() toxav_prepare_transmission() sets the internal toxav `call_active' state variable. This is checked in toxav_kill_transmission() and only if set, proceeds to release the resources. --- ratox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ratox.c') diff --git a/ratox.c b/ratox.c index 2829672..e81446d 100644 --- a/ratox.c +++ b/ratox.c @@ -500,7 +500,7 @@ cancelcall(struct friend *f, char *action) logmsg(": %s : Rx/Tx AV > %s\n", f->name, action); if (f->av.num != -1) { - if (toxav_get_call_state(toxav, f->av.num) != av_CallInviting) { + if (f->av.transmission) { r = toxav_kill_transmission(toxav, f->av.num); if (r < 0) weprintf("Failed to kill transmission\n"); -- cgit v1.2.3