tImplement peer timeout - ratox - FIFO based tox client
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 059702d6521de79503ca51dde4ddf96903169fe3
 (DIR) parent 12247fb018a2a472027bad9f976b26a75b093fa6
 (HTM) Author: sin <sin@2f30.org>
       Date:   Wed,  8 Oct 2014 01:24:37 +0100
       
       Implement peer timeout
       
       Diffstat:
         M ratox.c                             |      15 ++++++++++++---
       
       1 file changed, 12 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/ratox.c b/ratox.c
       t@@ -514,15 +514,24 @@ cbreqtimeout(void *av, int32_t cnum, void *udata)
                                break;
                if (!f)
                        return;
       -        cancelrxcall(f, "Timeout");
       -        canceltxcall(f, "Timeout");
       +        cancelrxcall(f, "Request timeout");
       +        canceltxcall(f, "Request timeout");
                toxav_kill_transmission(toxav, cnum);
        }
        
        static void
        cbpeertimeout(void *av, int32_t cnum, void *udata)
        {
       -        printf("Entered %s\n", __func__);
       +        struct friend *f;
       +
       +        TAILQ_FOREACH(f, &friendhead, entry)
       +                if (f->av.num == cnum)
       +                        break;
       +        if (!f)
       +                return;
       +        cancelrxcall(f, "Peer timeout");
       +        canceltxcall(f, "Peer timeout");
       +        toxav_kill_transmission(toxav, cnum);
        }
        
        static void