diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-05 04:15:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-05 04:15:39 +0200 |
commit | 917b5dc7075a15bded4948efba8e686dba4509f8 (patch) | |
tree | ede8ff56bbd196da3c124f71a242d9bc5c31ce71 /src/libsystemd-bus/bus-message.c | |
parent | 7286037fd438e93137571fa68a741cc894d8e549 (diff) |
bus: add convenience functions for constructing and sending method calls/signals in one call
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r-- | src/libsystemd-bus/bus-message.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c index 773a670119..7acab50979 100644 --- a/src/libsystemd-bus/bus-message.c +++ b/src/libsystemd-bus/bus-message.c @@ -1241,7 +1241,7 @@ int sd_bus_message_close_container(sd_bus_message *m) { return 0; } -static int message_append_ap( +int bus_message_append_ap( sd_bus_message *m, const char *types, va_list ap) { @@ -1327,7 +1327,7 @@ static int message_append_ap( n = va_arg(ap, unsigned); for (i = 0; i < n; i++) { - r = message_append_ap(m, s, ap); + r = bus_message_append_ap(m, s, ap); if (r < 0) return r; } @@ -1349,7 +1349,7 @@ static int message_append_ap( if (r < 0) return r; - r = message_append_ap(m, s, ap); + r = bus_message_append_ap(m, s, ap); if (r < 0) return r; @@ -1377,7 +1377,7 @@ static int message_append_ap( t += k - 1; - r = message_append_ap(m, s, ap); + r = bus_message_append_ap(m, s, ap); if (r < 0) return r; @@ -1407,10 +1407,10 @@ int sd_bus_message_append(sd_bus_message *m, const char *types, ...) { if (m->sealed) return -EPERM; if (!types) - return -EINVAL; + return 0; va_start(ap, types); - r = message_append_ap(m, types, ap); + r = bus_message_append_ap(m, types, ap); va_end(ap); return r; |