summaryrefslogtreecommitdiff
path: root/client/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/commands.c')
-rw-r--r--client/commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/commands.c b/client/commands.c
index 6f8ec62f..263453ad 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",