[PATCH BlueZ 2/4] client/adv_monitor: Remove shell quit from adv_monitor_register_app

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In adv_monitor, adv_monitor_register_app is called when an advertising
monitor manager proxy has been added, when a new adapter is added.

This commit removes bt_shell_noninteractive_quit from this function,
since it causes the shell to exit without a user command having
executed.
---
 client/adv_monitor.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/client/adv_monitor.c b/client/adv_monitor.c
index 792379fc4..29e670960 100644
--- a/client/adv_monitor.c
+++ b/client/adv_monitor.c
@@ -4,6 +4,7 @@
  *  BlueZ - Bluetooth protocol stack for Linux
  *
  *  Copyright (C) 2020 Google LLC
+ *  Copyright 2024 NXP
  *
  *
  */
@@ -372,12 +373,11 @@ static void register_reply(DBusMessage *message, void *user_data)
 
 	if (!dbus_set_error_from_message(&error, message)) {
 		bt_shell_printf("AdvertisementMonitor path registered\n");
-		return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+		return;
 	}
 
 	bt_shell_printf("Failed to register path: %s\n", error.name);
 	dbus_error_free(&error);
-	return bt_shell_noninteractive_quit(EXIT_FAILURE);
 }
 
 static void unregister_setup(DBusMessageIter *iter, void *user_data)
@@ -408,13 +408,13 @@ void adv_monitor_register_app(DBusConnection *conn)
 {
 	if (manager.app_registered) {
 		bt_shell_printf("Advertisement Monitor already registered\n");
-		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+		return;
 	} else if (manager.supported_types == NULL ||
 		!g_dbus_proxy_method_call(manager.proxy, "RegisterMonitor",
 					register_setup, register_reply,
 					NULL, NULL)) {
 		bt_shell_printf("Failed to register Advertisement Monitor\n");
-		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+		return;
 	}
 	manager.app_registered = TRUE;
 }
-- 
2.39.2





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux