changeset 687:e6d60eacf24d

Update to new th_io_fopen() API.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Jul 2018 08:08:50 +0300
parents 256002aa06cc
children 264cada93ae9
files main.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Mon Jul 09 07:28:45 2018 +0300
+++ b/main.c	Mon Jul 09 08:08:50 2018 +0300
@@ -2059,11 +2059,12 @@
         th_ioctx *ctx;
 
         setConfigFile = th_strdup_printf("%s%c%s", setConfigDir, SET_DIR_SEPARATOR, SET_CONFIG_FILE);
-        if ((ctx = th_io_fopen(&th_stdio_io_ops, setConfigFile, "r")) != NULL)
+        if (th_io_fopen(&ctx, &th_stdio_io_ops, setConfigFile, "r") == THERR_OK)
         {
             th_io_set_handlers(ctx, nn_ioctx_errfunc, nn_ioctx_msgfunc);
 
-            THMSG(0, "Reading configuration from '%s'.\n", setConfigFile);
+            THMSG(0, "Reading configuration from '%s'.\n",
+                setConfigFile);
 
             th_cfg_read(ctx, cfg);
             th_io_close(ctx);