summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-08-14 17:05:33 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-08-15 13:49:44 +0300
commit41516dd2c14e1d3cbd66f92f08d3515a2b5a0680 (patch)
tree21401512741a1acc8f89ad006bf370a08c28cba1 /src/service.c
parentcb6226f69ef817fd8af98b77a6cf8f17067263dd (diff)
downloadconnman-41516dd2c14e1d3cbd66f92f08d3515a2b5a0680.tar.gz
connman-41516dd2c14e1d3cbd66f92f08d3515a2b5a0680.tar.bz2
connman-41516dd2c14e1d3cbd66f92f08d3515a2b5a0680.zip
service: Allow setting path when sending pending dbus reply
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/service.c b/src/service.c
index 8edd056e..c5fe0231 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3425,7 +3425,8 @@ static void remove_timeout(struct connman_service *service)
}
}
-void __connman_service_reply_dbus_pending(DBusMessage *pending, int error)
+void __connman_service_reply_dbus_pending(DBusMessage *pending, int error,
+ const char *path)
{
if (pending != NULL) {
if (error > 0) {
@@ -3435,10 +3436,11 @@ void __connman_service_reply_dbus_pending(DBusMessage *pending, int error)
if (reply != NULL)
g_dbus_send_message(connection, reply);
} else {
- const char *sender, *path;
+ const char *sender;
sender = dbus_message_get_interface(pending);
- path = dbus_message_get_path(pending);
+ if (path == NULL)
+ path = dbus_message_get_path(pending);
DBG("sender %s path %s", sender, path);
@@ -3460,7 +3462,8 @@ static void reply_pending(struct connman_service *service, int error)
remove_timeout(service);
if (service->pending != NULL) {
- __connman_service_reply_dbus_pending(service->pending, error);
+ __connman_service_reply_dbus_pending(service->pending, error,
+ NULL);
service->pending = NULL;
}
}