chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal: downgrade comments about sd_journal_print_with_location()
[elogind.git]
/
src
/
libsystemd-bus
/
bus-message.c
diff --git
a/src/libsystemd-bus/bus-message.c
b/src/libsystemd-bus/bus-message.c
index 9e712717cc34b31864af3e5d97953cc52dac2539..8d449c547827581950825a93c07dd6fa14e9c9bc 100644
(file)
--- a/
src/libsystemd-bus/bus-message.c
+++ b/
src/libsystemd-bus/bus-message.c
@@
-791,7
+791,9
@@
_public_ sd_bus_message* sd_bus_message_ref(sd_bus_message *m) {
}
_public_ sd_bus_message* sd_bus_message_unref(sd_bus_message *m) {
}
_public_ sd_bus_message* sd_bus_message_unref(sd_bus_message *m) {
- assert_return(m, NULL);
+
+ if (!m)
+ return NULL;
assert(m->n_ref > 0);
m->n_ref--;
assert(m->n_ref > 0);
m->n_ref--;
@@
-2693,7
+2695,7
@@
static int bus_message_close_header(sd_bus_message *m) {
return 0;
}
return 0;
}
-int bus_message_seal(sd_bus_message *m, uint64_t serial) {
+int bus_message_seal(sd_bus_message *m, uint64_t serial
, usec_t timeout
) {
struct bus_body_part *part;
size_t l, a;
unsigned i;
struct bus_body_part *part;
size_t l, a;
unsigned i;
@@
-2740,6
+2742,7
@@
int bus_message_seal(sd_bus_message *m, uint64_t serial) {
return r;
m->header->serial = serial;
return r;
m->header->serial = serial;
+ m->timeout = m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED ? 0 : timeout;
/* Add padding at the end of the fields part, since we know
* the body needs to start at an 8 byte alignment. We made
/* Add padding at the end of the fields part, since we know
* the body needs to start at an 8 byte alignment. We made
@@
-4149,7
+4152,7
@@
_public_ int sd_bus_message_rewind(sd_bus_message *m, int complete) {
}
c->offset_index = 0;
}
c->offset_index = 0;
- c->item_size =
c->n_offsets > 0 ? c->offsets[0] : c->end
;
+ c->item_size =
(c->n_offsets > 0 ? c->offsets[0] : c->end) - c->begin
;
return !isempty(c->signature);
}
return !isempty(c->signature);
}