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;
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
}
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);
}