diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-02-19 15:20:05 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-02-21 16:22:35 +0200 |
commit | df9e11ae7a5c23ea3112cefff672795213c8a978 (patch) | |
tree | 79e4424ebca8f393b995010744ddc27542cdd97e /client/services.c | |
parent | a4975fb8bd19ef41e62d47e809bb6175bad48279 (diff) | |
download | connman-df9e11ae7a5c23ea3112cefff672795213c8a978.tar.gz connman-df9e11ae7a5c23ea3112cefff672795213c8a978.tar.bz2 connman-df9e11ae7a5c23ea3112cefff672795213c8a978.zip |
client: Return number of arguments processed when setting properties
Diffstat (limited to 'client/services.c')
-rw-r--r-- | client/services.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/services.c b/client/services.c index 5f252ce5..d2ec8b3b 100644 --- a/client/services.c +++ b/client/services.c @@ -501,6 +501,7 @@ int set_service_property(DBusConnection *connection, DBusMessage *message, char *name, char *property, char **keys, void *data, int num_args) { + int num_props = 1; DBusMessage *message_send; DBusMessageIter iter; struct service_data service; @@ -529,18 +530,20 @@ int set_service_property(DBusConnection *connection, DBusMessage *message, else if ((strcmp(property, "Domains.Configuration") == 0) || (strcmp(property, "Timeservers.Configuration") == 0) || (strcmp(property, "Nameservers.Configuration") == 0)) - append_property_array(&iter, property, data, num_args); + num_props = append_property_array(&iter, property, data, + num_args); else if ((strcmp(property, "IPv4.Configuration") == 0) || (strcmp(property, "IPv6.Configuration") == 0) || (strcmp(property, "Proxy.Configuration") == 0)) - append_property_dict(&iter, property, keys, data, num_args); + num_props = append_property_dict(&iter, property, keys, data, + num_args); dbus_connection_send(connection, message_send, NULL); dbus_connection_flush(connection); dbus_message_unref(message_send); g_free(path); - return 0; + return num_props; } int remove_service(DBusConnection *connection, DBusMessage *message, |