ratox

FIFO based tox client
git clone git://git.2f30.org/ratox
Log | Files | Refs | README | LICENSE

commit 044dff97271136c175dc4efa1f90c8b7dcacd19e
parent e020b1e9369fc6aaf9f600ab5b1bf93c1235e503
Author: sin <sin@2f30.org>
Date:   Wed, 24 Sep 2014 15:56:25 +0100

Cancel transfers when we come back after losing connectivity to the DHT

Diffstat:
Mratox.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/ratox.c b/ratox.c @@ -1159,6 +1159,13 @@ loop(void) if (tox_isconnected(tox) == 1) { if (connected == 0) { printout("Connected to DHT\n"); + /* Cancel any pending transfers */ + TAILQ_FOREACH(f, &friendhead, entry) { + if (tox_get_friend_connection_status(tox, f->fid) == 0) { + canceltxtransfer(f); + cancelrxtransfer(f); + } + } connected = 1; } } else {