diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2018-01-08 13:42:54 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2018-01-08 13:43:31 +0900 |
commit | 9362752a471a5c892d679548fbf2828d5fc5684b (patch) | |
tree | 83c7d29a28556906938f5c2198d81e2d35f86f92 /src/agent.c | |
parent | 22633ced6225d294ce8483efbf2b39ea0c0c1b65 (diff) | |
download | connman-9362752a471a5c892d679548fbf2828d5fc5684b.tar.gz connman-9362752a471a5c892d679548fbf2828d5fc5684b.tar.bz2 connman-9362752a471a5c892d679548fbf2828d5fc5684b.zip |
Imported Upstream version 1.35upstream/1.35
Change-Id: I174854914d9fd06a813270b57d1f7bc2bac63c6a
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
Diffstat (limited to 'src/agent.c')
-rw-r--r-- | src/agent.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/agent.c b/src/agent.c index bdeb0e71..8f7b19ba 100644 --- 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; } |