*
* Connection Manager
*
- * Copyright (C) 2007 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2009 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
agent_path = NULL;
}
-static gboolean agent_disconnect(void *data)
+static void agent_disconnect(DBusConnection *connection, void *data)
{
DBG("data %p", data);
agent_free();
-
- return TRUE;
}
int __connman_agent_register(const char *sender, const char *path)
if (agent_watch > 0)
g_dbus_remove_watch(connection, agent_watch);
+ if (agent_path == NULL)
+ return;
+
msg = dbus_message_new_method_call(agent_sender, agent_path,
CONNMAN_AGENT_INTERFACE, "Release");
+ if (msg == NULL)
+ return;
dbus_message_set_no_reply(msg, TRUE);