chiark / gitweb /
bus: it's OK to send messages with an empty payload but non-empty signature
authorLennart Poettering <lennart@poettering.net>
Tue, 10 Dec 2013 01:57:46 +0000 (02:57 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 10 Dec 2013 01:57:46 +0000 (02:57 +0100)
THis might happen when sending arrays with 0 enttries, hence this is not
an indication for a problem.

src/libsystemd-bus/bus-message.c

index f01f8b15bc213cc66e531c9e2e99a3f3c6576a75..32af8609b3d0c0264aac21e99e33a389f02cf073 100644 (file)
@@ -5085,9 +5085,6 @@ int bus_message_parse_fields(sd_bus_message *m) {
         if (m->n_fds != unix_fds)
                 return -EBADMSG;
 
-        if (isempty(m->root_container.signature) != (BUS_MESSAGE_BODY_SIZE(m) == 0))
-                return -EBADMSG;
-
         switch (m->header->type) {
 
         case SD_BUS_MESSAGE_SIGNAL: