diff options
author | Federico <nierro92@gmail.com> | 2017-04-25 09:32:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-04-25 09:32:24 +0200 |
commit | 19fe49f62cc916f1237ea92a04fc80ee75285dde (patch) | |
tree | d14cd80a18a638f5fd4901be14f26221783871dc /src/libsystemd/sd-bus | |
parent | f847b8b7df1de5686f8cbe5a4944a85dfb303595 (diff) |
Export sd_bus_message_append_ap. It is renamed to sd_bus_message_appendv to follow systemd naming conventions. (#5753)
Moreover, man page for sd_bus_message_append is updated with reference to new exposed function.
Makefile-man is updated too, to reflect new alias.
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r-- | src/libsystemd/sd-bus/bus-convenience.c | 10 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.c | 12 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.h | 2 |
3 files changed, 11 insertions, 13 deletions
diff --git a/src/libsystemd/sd-bus/bus-convenience.c b/src/libsystemd/sd-bus/bus-convenience.c index 2d06bf541f..04158cae4d 100644 --- a/src/libsystemd/sd-bus/bus-convenience.c +++ b/src/libsystemd/sd-bus/bus-convenience.c @@ -48,7 +48,7 @@ _public_ int sd_bus_emit_signal( va_list ap; va_start(ap, types); - r = bus_message_append_ap(m, types, ap); + r = sd_bus_message_appendv(m, types, ap); va_end(ap); if (r < 0) return r; @@ -85,7 +85,7 @@ _public_ int sd_bus_call_method_async( va_list ap; va_start(ap, types); - r = bus_message_append_ap(m, types, ap); + r = sd_bus_message_appendv(m, types, ap); va_end(ap); if (r < 0) return r; @@ -123,7 +123,7 @@ _public_ int sd_bus_call_method( va_list ap; va_start(ap, types); - r = bus_message_append_ap(m, types, ap); + r = sd_bus_message_appendv(m, types, ap); va_end(ap); if (r < 0) goto fail; @@ -162,7 +162,7 @@ _public_ int sd_bus_reply_method_return( va_list ap; va_start(ap, types); - r = bus_message_append_ap(m, types, ap); + r = sd_bus_message_appendv(m, types, ap); va_end(ap); if (r < 0) return r; @@ -493,7 +493,7 @@ _public_ int sd_bus_set_property( goto fail; va_start(ap, type); - r = bus_message_append_ap(m, type, ap); + r = sd_bus_message_appendv(m, type, ap); va_end(ap); if (r < 0) goto fail; diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 5cec804e32..da6fd3b896 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -2341,7 +2341,7 @@ static int type_stack_pop(TypeStack *stack, unsigned max, unsigned *i, const cha return 1; } -int bus_message_append_ap( +_public_ int sd_bus_message_appendv( sd_bus_message *m, const char *types, va_list ap) { @@ -2351,10 +2351,10 @@ int bus_message_append_ap( unsigned stack_ptr = 0; int r; - assert(m); - - if (!types) - return 0; + assert_return(m, -EINVAL); + assert_return(types, -EINVAL); + assert_return(!m->sealed, -EPERM); + assert_return(!m->poisoned, -ESTALE); n_array = (unsigned) -1; n_struct = strlen(types); @@ -2555,7 +2555,7 @@ _public_ int sd_bus_message_append(sd_bus_message *m, const char *types, ...) { assert_return(!m->poisoned, -ESTALE); va_start(ap, types); - r = bus_message_append_ap(m, types, ap); + r = sd_bus_message_appendv(m, types, ap); va_end(ap); return r; diff --git a/src/libsystemd/sd-bus/bus-message.h b/src/libsystemd/sd-bus/bus-message.h index 4710c106b9..a59aa73833 100644 --- a/src/libsystemd/sd-bus/bus-message.h +++ b/src/libsystemd/sd-bus/bus-message.h @@ -220,8 +220,6 @@ int bus_message_from_malloc( int bus_message_get_arg(sd_bus_message *m, unsigned i, const char **str); int bus_message_get_arg_strv(sd_bus_message *m, unsigned i, char ***strv); -int bus_message_append_ap(sd_bus_message *m, const char *types, va_list ap); - int bus_message_parse_fields(sd_bus_message *m); struct bus_body_part *message_append_part(sd_bus_message *m); |