Clean up any queued Agent API messages when the agent disappears or
the service is disconnected. Send cancel to the agent on D-Bus
timeout.
g_free(agent_path);
agent_path = NULL;
+
+ __connman_agent_cancel(NULL);
}
static void agent_disconnect(DBusConnection *conn, void *data)
dbus_pending_call_unref(call);
queue_data->call = NULL;
+ if (dbus_message_is_error(reply, "org.freedesktop.DBus.Error.Timeout")
+ == TRUE || dbus_message_is_error(reply,
+ "org.freedesktop.DBus.Error.TimedOut")
+ == TRUE) {
+ agent_send_cancel();
+ }
+
queue_data->callback(reply, queue_data->user_data);
dbus_message_unref(reply);
DBG("service %p", service);
+ __connman_agent_cancel(service);
+
if (service->network != NULL) {
err = __connman_network_disconnect(service->network);
} else if (service->type == CONNMAN_SERVICE_TYPE_VPN &&