{
DBusMessage *reply;
DBusError error;
- struct config_create_data *cb_data = user_data;
+ struct connection_data *data = user_data;
+ struct config_create_data *cb_data = data->cb_data;
if (dbus_pending_call_get_completed(call) == FALSE)
return;
cb_data->callback(cb_data->message,
ECONNREFUSED, NULL);
free_config_cb_data(cb_data);
+ data->cb_data = NULL;
}
goto done;
}
cb_data->path = g_strdup(data->path);
}
- dbus_pending_call_set_notify(call, connect_reply, cb_data, NULL);
+ dbus_pending_call_set_notify(call, connect_reply, data, NULL);
dbus_message_unref(message);