tClean up calls on shutdown - ratox - FIFO based tox client
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 167560d3b43da9ebdee35374ba753280738ed4bd
 (DIR) parent 442f78450879cb8524d21e3ec5c9080afd736f7f
 (HTM) Author: sin <sin@2f30.org>
       Date:   Sun,  5 Oct 2014 21:36:49 +0100
       
       Clean up calls on shutdown
       
       Diffstat:
         M ratox.c                             |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/ratox.c b/ratox.c
       t@@ -1320,7 +1320,6 @@ friendcreate(int32_t frnum)
                ftruncate(f->fd[FCALL_PENDING], 0);
                dprintf(f->fd[FCALL_PENDING], "0\n");
        
       -        free(f->av.frame);
                f->av.state = av_CallNonExistant;
                f->av.num = -1;
        
       t@@ -1336,8 +1335,11 @@ frienddestroy(struct friend *f)
        
                canceltxtransfer(f);
                cancelrxtransfer(f);
       -        if (f->av.state != av_CallNonExistant)
       +        if (f->av.state != av_CallNonExistant) {
       +                cancelrxcall(f, "Destroying");
       +                canceltxcall(f, "Destroying");
                        toxav_kill_transmission(toxav, f->av.num);
       +        }
                for (i = 0; i < LEN(ffiles); i++) {
                        if (f->dirfd != -1) {
                                unlinkat(f->dirfd, ffiles[i].name, 0);