summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-05-08 06:59:23 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-05-08 07:30:10 (GMT)
commit71ba394239611a0d1f49b118d16a8c36d7dd6757 (patch)
tree91a554c6dc723839c60c08e708ef62fc93e30a90 /client
parent1ea2216d285f36a7cd42db863b1c291d465678e6 (diff)
downloadconnman-71ba394239611a0d1f49b118d16a8c36d7dd6757.zip
connman-71ba394239611a0d1f49b118d16a8c36d7dd6757.tar.gz
connman-71ba394239611a0d1f49b118d16a8c36d7dd6757.tar.bz2
client: Do service name syntax check when a name is specified
Diffstat (limited to 'client')
-rw-r--r--client/commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/commands.c b/client/commands.c
index 6f8ec62..263453a 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -322,15 +322,15 @@ static int cmd_services(char *args[], int num, struct connman_option *options)
break;
}
- if (check_dbus_name(service_name) == false)
- return -EINVAL;
-
if (service_name == NULL) {
return __connmanctl_dbus_method_call(connection, "/",
"net.connman.Manager", "GetServices",
services_list, NULL, DBUS_TYPE_INVALID);
}
+ if (check_dbus_name(service_name) == false)
+ return -EINVAL;
+
path = g_strdup_printf("/net/connman/service/%s", service_name);
return __connmanctl_dbus_method_call(connection, path,
"net.connman.Service", "GetProperties",