tIncorporated changes from master. - ratox - FIFO based tox client
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d6d3c59c4185f6eab5564b059760fd59a7bc430b
 (DIR) parent aa3bab4575c1cac186952e248d0d365e69fefa79
 (HTM) Author: pranomostro <pranomestro@gmail.com>
       Date:   Fri, 13 Jan 2017 14:14:59 +0100
       
       Incorporated changes from master.
       
       Diffstat:
         M ratox.c                             |      14 +++++++-------
       
       1 file changed, 7 insertions(+), 7 deletions(-)
       ---
 (DIR) diff --git a/ratox.c b/ratox.c
       t@@ -64,7 +64,7 @@ struct file {
                int         flags;
        };
        
       -enum { NONE, FIFO, STATIC, FOLDER };
       +enum { NONE, FIFO, STATIC };
        enum { IN, OUT, ERR };
        
        static struct file gfiles[] = {
       t@@ -1058,7 +1058,7 @@ readpass(const char *prompt, uint8_t **target, uint32_t *len)
                        return -1;
                *target = realloc(*target, strlen(p)); /* not null-terminated */
                if (!*target)
       -                eprintf("malloc:");
       +                eprintf("realloc:");
                memcpy(*target, p, strlen(p));
                *len = strlen(p);
                return 0;
       t@@ -1157,14 +1157,14 @@ datasave(void)
        
                tox_get_savedata(tox, intermediate);
        
       +        sz += encryptsavefile ? TOX_PASS_ENCRYPTION_EXTRA_LENGTH : 0;
       +        data = malloc(sz);
       +        if (!data)
       +                eprintf("malloc:");
       +
                if (encryptsavefile){
       -                sz += TOX_PASS_ENCRYPTION_EXTRA_LENGTH;
       -                data = malloc(sz);
       -                if (!intermediate)
       -                        eprintf("malloc:");
                        tox_pass_encrypt(intermediate, sz - TOX_PASS_ENCRYPTION_EXTRA_LENGTH, passphrase, pplen, data, NULL);
                } else {
       -                data = malloc(sz);
                        memcpy(data, intermediate, sz);
                }
                if (write(fd, data, sz) != sz)