This change keeps semantic of previous code that used to call exit() directly. --- tools/btmgmt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 9753724..4650876 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -135,8 +135,10 @@ static void discovering(uint16_t index, uint16_t len, const void *param, return; } - if (ev->discovering == 0 && discovery) + if (ev->discovering == 0 && discovery) { g_main_loop_quit(event_loop); + return; + } if (monitor) printf("hci%u type %u discovering %s\n", index, -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html