Mercurial > hg > nnchat
changeset 707:11eb7c30889e
Adjust to fit new th_ioctx API.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 10 Mar 2020 17:01:22 +0200 |
parents | 4426bbf3264b |
children | 84d7b33c4e83 |
files | main.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/main.c Sat Feb 29 12:23:53 2020 +0200 +++ b/main.c Tue Mar 10 17:01:22 2020 +0200 @@ -1278,7 +1278,7 @@ goto error; } - if ((ctx = th_io_new(&th_stdio_io_ops, setConfigFile)) == NULL) + if ((ctx = th_io_new(&th_stdio_io_ops, setConfigFile, "w")) == NULL) { printMsgQ(currWin, "Could not initialize I/O context for configuration file writing!\n"); goto error; @@ -1293,11 +1293,11 @@ S_IRUSR | S_IWUSR #endif )) == -1 || - (ctx->data = (void *) fdopen(cfgfd, "w")) == NULL) + (ctx->data = (void *) fdopen(cfgfd, ctx->mode)) == NULL) { int err = th_get_error(); - printMsgQ(currWin, "Could not create configuration to file '%s', %d: %s\n", - ctx->filename, err, th_error_str(err)); + printMsgQ(currWin, "Could not create configuration to file '%s': %s\n", + ctx->filename, th_error_str(err)); goto error; }