dbus/dbus dbus-message.c,1.125,1.126

Olivier Andrieu oandrieu at pdx.freedesktop.org
Thu Apr 22 07:29:09 EST 2004


Update of /cvs/dbus/dbus/dbus
In directory pdx:/tmp/cvs-serv23716/dbus

Modified Files:
	dbus-message.c 
Log Message:
* dbus/dbus-message.c (decode_header_data, decode_string_field):
fix incorrect setting of .name_offset in the HeaderField (it was
off by two bytes, positioned right after the name and typecode)

* bus/bus.c (bus_context_new, bus_context_unref): test before
calling dbus_server_free_data_slot and _dbus_user_database_unref
in case of an error.

* tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
by libdbus-gtool.


Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- a/dbus-message.c	29 Mar 2004 13:11:05 -0000	1.125
+++ b/dbus-message.c	21 Apr 2004 21:29:07 -0000	1.126
@@ -5018,7 +5018,7 @@
   _dbus_string_init_const (field_data,
                            _dbus_string_get_const_data (data) + string_data_pos);
 
-  header_field->name_offset  = pos;
+  header_field->name_offset  = pos - 2;
   header_field->value_offset = _DBUS_ALIGN_VALUE (pos, 4);
   
 #if 0
@@ -5188,7 +5188,7 @@
               return FALSE;
             }
 
-          fields[field].name_offset  = pos;
+          fields[field].name_offset  = pos - 2;
           fields[field].value_offset = _DBUS_ALIGN_VALUE (pos, 4);
 
           /* No forging signals from the local path */
@@ -5222,7 +5222,7 @@
               return FALSE;
             }
           
-          fields[field].name_offset  = pos;
+          fields[field].name_offset  = pos - 2;
           fields[field].value_offset = _DBUS_ALIGN_VALUE (pos, 4);
 
           _dbus_verbose ("Found reply serial %u at offset %d\n",




More information about the dbus-commit mailing list