diff options
author | Inga Stotland <inga.stotland@intel.com> | 2022-10-05 13:43:09 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2022-10-05 13:48:35 -0700 |
commit | e71e1103abc63df5ba445897036eabfda4de2a2d (patch) | |
tree | 9d14c22f779e68e0b69b104d1645ad084df35bb3 /mesh/main.c | |
parent | fe9427041167871a3ad30f834db54971acfbcb23 (diff) | |
download | bluez-e71e1103abc63df5ba445897036eabfda4de2a2d.tar.gz |
mesh: Fix mesh to work with MESH_IO_TYPE_UNIT_TEST
This fixes mesh io flow for MESH_IO_TYPE_UNIT_TEST which
got broken after:
commit 9966cb8b6999a5f54fc13acbd7e1526512a84342
("mesh: Add new kernel MGMT based IO transport")
Diffstat (limited to 'mesh/main.c')
-rw-r--r-- | mesh/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesh/main.c b/mesh/main.c index 619b17d88..3bca020a0 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; } |