diff --git a/client/advertising.c b/client/advertising.c
index 382ae42..f9df1b8 100644
--- a/client/advertising.c
+++ b/client/advertising.c
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
+#include <errno.h>
#include "gdbus/gdbus.h"
#include "src/shared/util.h"
ad.registered = true;
bt_shell_printf("Advertising object registered\n");
print_ad();
- /* Leave advertise running even on noninteractive mode */
+ return bt_shell_noninteractive_quit(-EINPROGRESS);
} else {
bt_shell_printf("Failed to register advertisement: %s\n", error.name);
dbus_error_free(&error);
{
g_free(ad.service[type].uuid);
memset(&ad.service[type], 0, sizeof(ad.service[type]));
-
- return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}
static bool ad_add_data(struct ad_data *data, int argc, char *argv[])
static void ad_clear_manufacturer(int type)
{
memset(&ad.manufacturer[type], 0, sizeof(ad.manufacturer[type]));
-
- return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}
void ad_advertise_manufacturer(DBusConnection *conn, int type,
static void ad_clear_data(int type)
{
memset(&ad.data[type], 0, sizeof(ad.data[type]));
-
- return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}
void ad_advertise_data(DBusConnection *conn, int type, int argc, char *argv[])
diff --git a/client/main.c b/client/main.c
index c232195..d99a515 100644
--- a/client/main.c
+++ b/client/main.c
bt_shell_printf("Discovery %s\n", enable ? "started" : "stopped");
filter.active = enable;
- /* Leave the discovery running even on noninteractive mode */
+
+ return bt_shell_noninteractive_quit(-EINPROGRESS);
}
static void clear_discovery_filter(DBusMessageIter *iter, void *user_data)