bus: fix signature handling when exiting container
authorLennart Poettering <lennart@poettering.net>
Tue, 10 Dec 2013 00:06:29 +0000 (01:06 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 10 Dec 2013 00:06:29 +0000 (01:06 +0100)
src/libsystemd-bus/bus-message.c

index 007fab4..35a4678 100644 (file)
@@ -3911,6 +3911,7 @@ _public_ int sd_bus_message_enter_container(sd_bus_message *m,
 
 _public_ int sd_bus_message_exit_container(sd_bus_message *m) {
         struct bus_container *c;
+        unsigned saved;
         int r;
 
         assert_return(m, -EINVAL);
@@ -3942,7 +3943,10 @@ _public_ int sd_bus_message_exit_container(sd_bus_message *m) {
 
         c = message_get_container(m);
 
+        saved = c->index;
+        c->index = c->saved_index;
         r = container_next_item(m, c, &m->rindex);
+        c->index = saved;
         if (r < 0)
                 return r;