GVariant *parameters,
gpointer user_data)
{
- DBG("+");
char *path = NULL;
-
- GVariant *optional_param;
+ GVariant *optional_param = NULL;
if (strcasecmp(signal_name, "InterfacesAdded") == 0) {
+ g_variant_get(parameters, "(&o@a{sa{sv}})", &path, &optional_param);
+ if (optional_param)
+ g_variant_unref(optional_param);
- g_variant_get(parameters, "(&o@a{sa{sv}})",
- &path, &optional_param);
if (!path) {
ERR("Invalid adapter path");
return;
g_variant_get(parameters, "(&o@as)", &path, &optional_param);
if (!path)
__bt_hf_agent_unregister();
+
+ if (optional_param)
+ g_variant_unref(optional_param);
}
- DBG("-");
}
static int __bt_hf_agent_get_adapter_path(GDBusConnection *conn, char *path)