Diff between fe9427041167871a3ad30f834db54971acfbcb23 and e71e1103abc63df5ba445897036eabfda4de2a2d

Changed Files

File Additions Deletions Status
mesh/main.c +7 -1 modified
mesh/mesh-io.c +1 -1 modified

Full Patch

diff --git a/mesh/main.c b/mesh/main.c
index 619b17d..3bca020 100644
--- a/mesh/main.c
+++ b/mesh/main.c
@@ -137,8 +137,14 @@ static void signal_handler(uint32_t signo, void *user_data)
 		return;
 
 	l_info("Terminating");
+
 	mesh_cleanup(true);
-	l_timeout_create(1, kill_to, NULL, NULL);
+
+	if (io_type != MESH_IO_TYPE_UNIT_TEST)
+		l_timeout_create(1, kill_to, NULL, NULL);
+	else
+		l_main_quit();
+
 	terminated = true;
 }
 
diff --git a/mesh/mesh-io.c b/mesh/mesh-io.c
index ae6a82e..233f4b3 100644
--- a/mesh/mesh-io.c
+++ b/mesh/mesh-io.c
@@ -151,7 +151,7 @@ struct mesh_io *mesh_io_new(enum mesh_io_type type, void *opts,
 
 	default_io->api = api;
 
-	if (!api->init(default_io, &default_io->favored_index, user_data))
+	if (!api->init(default_io, opts, user_data))
 		goto fail;
 
 	return default_io;