tTouch text_out at init time - ratox - FIFO based tox client
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d373e89bb878c1d2808bfae7d3ecfbb631e325e6
 (DIR) parent b62173dab72b3e595a00d183da5f9d7508ed4c7f
 (HTM) Author: sin <sin@2f30.org>
       Date:   Mon, 15 Sep 2014 12:22:00 +0100
       
       Touch text_out at init time
       
       Diffstat:
         M ratatox.c                           |      10 ++++++++++
       
       1 file changed, 10 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/ratatox.c b/ratatox.c
       t@@ -500,6 +500,7 @@ str2id(uint8_t *idstr, uint8_t *id)
        static void
        friendcreate(int32_t fid)
        {
       +        FILE *fp;
                struct friend *f;
                char path[PATH_MAX];
                int i;
       t@@ -543,6 +544,15 @@ friendcreate(int32_t fid)
                        }
                        f->fd[i] = r;
                }
       +
       +        snprintf(path, sizeof(path), "%s/text_out", f->idstr);
       +        fp = fopen(path, "a");
       +        if (!fp) {
       +                perror("fopen");
       +                exit(1);
       +        }
       +        fclose(fp);
       +
                TAILQ_INSERT_TAIL(&friendhead, f, entry);
        }