tDon't forget to queue call_out while incoming ringing - ratox - FIFO based tox client
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 3664f2c3438675bee5aef0cbbbf1e5affd649a91
 (DIR) parent 0f2b352efb01d3f8b25e0a3cc836971da274d0c6
 (HTM) Author: FRIGN <dev@frign.de>
       Date:   Fri, 17 Oct 2014 22:57:42 +0200
       
       Don't forget to queue call_out while incoming ringing
       
       Else the call would be rejected immediately in case you receive a
       call and have not yet opened call_out for reading.
       
       Diffstat:
         M ratox.c                             |      11 +++++++++++
       
       1 file changed, 11 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/ratox.c b/ratox.c
       t@@ -1779,6 +1779,17 @@ loop(void)
        
                                switch (toxav_get_call_state(toxav, f->av.num)) {
                                case av_CallStarting:
       +                                if (f->fd[FCALL_OUT] < 0) {
       +                                        fd = fifoopen(f->dirfd, ffiles[FCALL_OUT]);
       +                                        if (fd < 0) {
       +                                                f->av.state &= ~INCOMING;
       +                                                continue;
       +                                        } else {
       +                                                f->av.state |= INCOMING;
       +                                                f->fd[FCALL_OUT] = fd;
       +                                        }
       +                                }
       +
                                        r = toxav_answer(toxav, f->av.num, &toxavconfig);
                                        if (r < 0) {
                                                weprintf("Failed to answer call\n");