summaryrefslogtreecommitdiff
path: root/src/agent.c
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2018-01-23 14:50:50 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2018-01-23 14:50:55 +0900
commit30602f521a85820a9f6b7ac04876400e00c68b15 (patch)
treef035a4fcc014a034f3b492886d1e8395f327fd25 /src/agent.c
parenta079cfe6f815f8c69055de834d1ccbdf1fd94ba7 (diff)
parent9362752a471a5c892d679548fbf2828d5fc5684b (diff)
downloadconnman-30602f521a85820a9f6b7ac04876400e00c68b15.tar.gz
connman-30602f521a85820a9f6b7ac04876400e00c68b15.tar.bz2
connman-30602f521a85820a9f6b7ac04876400e00c68b15.zip
Updated connman to version 1.35
Change-Id: I13526fbf80296a79be15548fc226a308941ac9ec Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
Diffstat (limited to 'src/agent.c')
-rwxr-xr-xsrc/agent.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/agent.c b/src/agent.c
index bdeb0e71..8f7b19ba 100755
--- a/src/agent.c
+++ b/src/agent.c
@@ -165,12 +165,17 @@ static int send_cancel_request(struct connman_agent *agent,
struct connman_agent_request *request)
{
DBusMessage *message;
+ const char *interface = NULL;
- DBG("send cancel req to %s %s", agent->owner, agent->path);
+ if (request && request->driver)
+ interface = request->driver->interface;
+
+ DBG("send cancel req to %s %s iface %s", agent->owner, agent->path,
+ interface);
message = dbus_message_new_method_call(agent->owner,
agent->path,
- request->driver->interface,
+ interface,
"Cancel");
if (!message) {
connman_error("Couldn't allocate D-Bus message");
@@ -519,12 +524,12 @@ void connman_agent_cancel(void *user_context)
user_context) {
DBG("cancel pending %p", request);
+ agent->queue = g_list_delete_link(agent->queue,
+ list);
+
request->callback(NULL, request->user_data);
agent_request_free(request);
-
- agent->queue = g_list_delete_link(agent->queue,
- list);
}
list = next;
@@ -581,7 +586,7 @@ static void agent_release(struct connman_agent *agent, const char *interface)
message = dbus_message_new_method_call(agent->owner, agent->path,
interface, "Release");
- if (message == NULL) {
+ if (!message) {
connman_error("Couldn't allocate D-Bus message");
return;
}