From 32e9f1025bef08947af7da7b37c223109f802c5d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 27 Oct 2011 21:55:57 +0300 Subject: [PATCH] Fix exiting btmgmt when there are no adapters present --- mgmt/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mgmt/main.c b/mgmt/main.c index 884c8c006..228f47584 100644 --- a/mgmt/main.c +++ b/mgmt/main.c @@ -484,6 +484,9 @@ static void index_rsp(int mgmt_sk, uint16_t op, uint16_t id, uint8_t status, printf("Index list with %u item%s\n", count, count > 1 ? "s" : ""); + if (count == 0) + exit(EXIT_SUCCESS); + if (monitor && count > 0) printf("\t"); -- 2.47.3