summaryrefslogtreecommitdiff
path: root/src/dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus.c')
-rw-r--r--src/dbus.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/dbus.c b/src/dbus.c
index e153c35ab3..2a379a2b3e 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -1212,55 +1212,6 @@ int bus_broadcast(Manager *m, DBusMessage *message) {
return oom ? -ENOMEM : 0;
}
-int bus_parse_strv(DBusMessage *m, char ***_l) {
- DBusMessageIter iter, sub;
- unsigned n = 0, i = 0;
- char **l;
-
- assert(m);
- assert(_l);
-
- if (!dbus_message_iter_init(m, &iter) ||
- dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
- dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_STRING)
- return -EINVAL;
-
- dbus_message_iter_recurse(&iter, &sub);
-
- while (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_INVALID) {
- n++;
- dbus_message_iter_next(&sub);
- }
-
- if (!(l = new(char*, n+1)))
- return -ENOMEM;
-
- assert_se(dbus_message_iter_init(m, &iter));
- dbus_message_iter_recurse(&iter, &sub);
-
- while (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_INVALID) {
- const char *s;
-
- assert_se(dbus_message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING);
- dbus_message_iter_get_basic(&sub, &s);
-
- if (!(l[i++] = strdup(s))) {
- strv_free(l);
- return -ENOMEM;
- }
-
- dbus_message_iter_next(&sub);
- }
-
- assert(i == n);
- l[i] = NULL;
-
- if (_l)
- *_l = l;
-
- return 0;
-}
-
bool bus_has_subscriber(Manager *m) {
Iterator i;
DBusConnection *c;