{ }
};
+static void unregister_profile(struct bluetooth_profile *profile)
+{
+ g_dbus_unregister_interface(connection, profile->path,
+ "org.bluez.Profile1");
+ g_free(profile->path);
+ profile->path = NULL;
+}
+
static void register_profile_reply(DBusPendingCall *call, void *user_data)
{
struct bluetooth_profile *profile = user_data;
goto done;
}
- g_free(profile->path);
- profile->path = NULL;
+ unregister_profile(profile);
error("bluetooth: RequestProfile error: %s, %s", derr.name,
derr.message);
dbus_message_unref(reply);
}
-static void unregister_profile(struct bluetooth_profile *profile)
-{
- g_dbus_unregister_interface(connection, profile->path,
- "org.bluez.Profile1");
- g_free(profile->path);
- profile->path = NULL;
-}
-
static void profile_free(void *data)
{
struct bluetooth_profile *profile = data;