summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--bus/bus.c6
-rw-r--r--dbus/dbus-message.c6
-rw-r--r--tools/Makefile.am2
4 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ed69cf9..ec26cf63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
+
+ * 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.
+
2004-04-19 Kristian Høgsberg <krh@redhat.com>
* dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
diff --git a/bus/bus.c b/bus/bus.c
index 32a5760c..79611548 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -753,7 +753,8 @@ bus_context_new (const DBusString *config_file,
if (context != NULL)
bus_context_unref (context);
- dbus_server_free_data_slot (&server_data_slot);
+ if (server_data_slot >= 0)
+ dbus_server_free_data_slot (&server_data_slot);
return NULL;
}
@@ -890,7 +891,8 @@ bus_context_unref (BusContext *context)
dbus_free (context->pidfile);
}
- _dbus_user_database_unref (context->user_database);
+ if (context->user_database != NULL)
+ _dbus_user_database_unref (context->user_database);
dbus_free (context);
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index 322e5d0b..9066843f 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -5018,7 +5018,7 @@ decode_string_field (const DBusString *data,
_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 @@ decode_header_data (const DBusString *data,
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 @@ decode_header_data (const DBusString *data,
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",
diff --git a/tools/Makefile.am b/tools/Makefile.am
index a6a38a97..d3accc88 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -38,7 +38,7 @@ dbus_viewer_SOURCES= \
dbus_send_LDADD= $(top_builddir)/dbus/libdbus-1.la
dbus_monitor_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
dbus_launch_LDADD= $(DBUS_X_LIBS)
-dbus_viewer_LDADD= $(top_builddir)/glib/libdbus-gtool.la $(DBUS_GTK_LIBS)
+dbus_viewer_LDADD= $(DBUS_GLIB_TOOL_LIBS) $(top_builddir)/glib/libdbus-gtool.la $(DBUS_GTK_LIBS)
man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1
EXTRA_DIST = $(man_MANS)