changeset 516:cfd536d654a6

Fix ioctx handlers setup.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 26 Dec 2019 13:02:41 +0200
parents d512555bdd0f
children 80185b9901ba
files tests.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests.c	Thu Dec 26 13:02:25 2019 +0200
+++ b/tests.c	Thu Dec 26 13:02:41 2019 +0200
@@ -394,6 +394,8 @@
         goto out;
     }
 
+    th_io_set_handlers(fh, test_ioctx_error, test_ioctx_msg);
+
     th_cfg_read(fh, cfg);
 
     // Test read values against expected values
@@ -485,8 +487,6 @@
     test_config_values(cfg);
 
     // Attempt to write the file
-    th_io_set_handlers(fh, test_ioctx_error, test_ioctx_msg);
-
     if (th_io_fopen(&fh, &th_stdio_io_ops, filename, "w") != THERR_OK)
     {
         int err = th_get_error();
@@ -495,6 +495,8 @@
         goto out;
     }
 
+    th_io_set_handlers(fh, test_ioctx_error, test_ioctx_msg);
+
     th_cfg_write(fh, cfg);
     th_io_free(fh);
     fh = NULL;