#define NUMBER_OF_FLAGS 10
-GDBusConnection *g_conn;
-guint owner_id;
-guint manager_id;
+static GDBusConnection *g_conn;
+static guint owner_id;
+static guint manager_id;
static gboolean new_service = FALSE;
static gboolean new_char = FALSE;
static int serv_id = 1;
static bool is_server_started = false;
-GCancellable *register_cancel;
+static GCancellable *register_cancel;
/* Introspection data for the service we are exporting */
static const gchar service_introspection_xml[] =
if (err != NULL) {
BT_ERR("D-Bus API failure: errCode[%x], message[%s]",
err->code, err->message);
+ if (err->code == G_DBUS_ERROR_SERVICE_UNKNOWN ||
+ g_strrstr(err->message, BT_ERROR_DOES_NOT_EXIST)) {
+ g_clear_error(&err);
+ goto done;
+ }
g_clear_error(&err);
}
return BLUETOOTH_ERROR_INTERNAL;
}
g_variant_unref(ret);
+done:
is_server_started = false;
BT_INFO("UnregisterApplication is completed");