summaryrefslogtreecommitdiff
path: root/src/dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-15 15:31:54 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-21 19:29:45 +0200
commit8d0e38a2b966799af884e78a54fd6a2dffa44788 (patch)
tree7e5b7aaaebe2342ec4dcbaaedc3991bbe09b94ce /src/dbus.c
parent48f82119ce55caa7671598fb1bd90df4eb00d150 (diff)
dbus: introduce UnsetAndSetEnvironment()
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;