diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2012-05-02 16:46:09 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-05-04 11:10:08 +0300 |
commit | 815dc93c33a379abf346fbef1640bbf15f23b286 (patch) | |
tree | a51afd09bdcb9547f43064fff7e42d0236befe4d /src/agent.c | |
parent | 0e3a21069677342e6096441c78f2b6b2ab368a16 (diff) | |
download | connman-815dc93c33a379abf346fbef1640bbf15f23b286.tar.gz connman-815dc93c33a379abf346fbef1640bbf15f23b286.tar.bz2 connman-815dc93c33a379abf346fbef1640bbf15f23b286.zip |
agent: Adding a parameter to give the error name to browser callback
Diffstat (limited to 'src/agent.c')
-rw-r--r-- | src/agent.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/agent.c b/src/agent.c index 96d40caa..33a11ecd 100644 --- a/src/agent.c +++ b/src/agent.c @@ -529,15 +529,18 @@ static void request_browser_reply(DBusPendingCall *call, void *user_data) struct request_browser_reply_data *browser_reply_data = user_data; DBusMessage *reply = dbus_pending_call_steal_reply(call); connman_bool_t result = FALSE; + const char *error = NULL; - if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) + if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) { + error = dbus_message_get_error_name(reply); goto done; + } result = TRUE; done: - browser_reply_data->callback(browser_reply_data->service, - result, browser_reply_data->user_data); + browser_reply_data->callback(browser_reply_data->service, result, + error, browser_reply_data->user_data); connman_service_unref(browser_reply_data->service); dbus_message_unref(reply); g_free(browser_reply_data); |