chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prep v234: Update root build files to upstream.
[elogind.git]
/
src
/
libelogind
/
sd-bus
/
bus-message.c
diff --git
a/src/libelogind/sd-bus/bus-message.c
b/src/libelogind/sd-bus/bus-message.c
index d4f59117b6730b5d3ef8a53f0a276b795413b7dd..cbe9c6259cc21236cdf0dc0cbe5b2c1b13bb2c8d 100644
(file)
--- a/
src/libelogind/sd-bus/bus-message.c
+++ b/
src/libelogind/sd-bus/bus-message.c
@@
-181,7
+181,7
@@
static void *message_extend_fields(sd_bus_message *m, size_t align, size_t sz, b
if (!np)
goto poison;
} else {
if (!np)
goto poison;
} else {
- /* Initially, the header is allocated as part of
of
+ /* Initially, the header is allocated as part of
* the sd_bus_message itself, let's replace it by
* dynamic data */
* the sd_bus_message itself, let's replace it by
* dynamic data */
@@
-1082,7
+1082,6
@@
_public_ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m) {
return &m->creds;
}
return &m->creds;
}
-#if 0 /// UNNEEDED by elogind
_public_ int sd_bus_message_is_signal(
sd_bus_message *m,
const char *interface,
_public_ int sd_bus_message_is_signal(
sd_bus_message *m,
const char *interface,
@@
-1101,7
+1100,6
@@
_public_ int sd_bus_message_is_signal(
return 1;
}
return 1;
}
-#endif // 0
_public_ int sd_bus_message_is_method_call(
sd_bus_message *m,
_public_ int sd_bus_message_is_method_call(
sd_bus_message *m,
@@
-2353,7
+2351,7
@@
static int type_stack_pop(TypeStack *stack, unsigned max, unsigned *i, const cha
return 1;
}
return 1;
}
-
int bus_message_append_ap
(
+
_public_ int sd_bus_message_appendv
(
sd_bus_message *m,
const char *types,
va_list ap) {
sd_bus_message *m,
const char *types,
va_list ap) {
@@
-2363,10
+2361,10
@@
int bus_message_append_ap(
unsigned stack_ptr = 0;
int r;
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);
n_array = (unsigned) -1;
n_struct = strlen(types);
@@
-2567,13
+2565,12
@@
_public_ int sd_bus_message_append(sd_bus_message *m, const char *types, ...) {
assert_return(!m->poisoned, -ESTALE);
va_start(ap, 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;
}
va_end(ap);
return r;
}
-#if 0 /// UNNEEDED by elogind
_public_ int sd_bus_message_append_array_space(
sd_bus_message *m,
char type,
_public_ int sd_bus_message_append_array_space(
sd_bus_message *m,
char type,
@@
-2617,6
+2614,7
@@
_public_ int sd_bus_message_append_array_space(
return 0;
}
return 0;
}
+#if 0 /// UNNEEDED by elogind
_public_ int sd_bus_message_append_array(
sd_bus_message *m,
char type,
_public_ int sd_bus_message_append_array(
sd_bus_message *m,
char type,
@@
-2879,7
+2877,7
@@
static int bus_message_close_header(sd_bus_message *m) {
/* The actual user data is finished now, we just complete the
variant and struct now (at least on gvariant). Remember
/* The actual user data is finished now, we just complete the
variant and struct now (at least on gvariant). Remember
- this position, so that during parsing we know where to
to
+ this position, so that during parsing we know where to
put the outer container end. */
m->user_body_size = m->body_size;
put the outer container end. */
m->user_body_size = m->body_size;