Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] tools: btmgmt: Add missing return after g_main_loop_quit()
@ 2013-02-19 21:00 Anderson Lizardo
  2013-02-19 21:00 ` [PATCH BlueZ 2/2] build: Remove leftover from .gitignore Anderson Lizardo
  2013-02-20  8:01 ` [PATCH BlueZ 1/2] tools: btmgmt: Add missing return after g_main_loop_quit() Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Anderson Lizardo @ 2013-02-19 21:00 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-20  8:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 21:00 [PATCH BlueZ 1/2] tools: btmgmt: Add missing return after g_main_loop_quit() Anderson Lizardo
2013-02-19 21:00 ` [PATCH BlueZ 2/2] build: Remove leftover from .gitignore Anderson Lizardo
2013-02-20  8:01 ` [PATCH BlueZ 1/2] tools: btmgmt: Add missing return after g_main_loop_quit() Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox