PATCH: dbus_message_get_path can return NULL.
Michael Krivoruchko
misha at sun.com
Thu Oct 6 12:09:00 PDT 2005
Hi,
Attached patch fixes segfault when verbose mode in use and
dbus_message_get_path returns NULL for current message.
Misha
--
-------------- next part --------------
diff -ruN dbus/dbus/dbus-connection.c dbus-verbose-null-path/dbus/dbus-connection.c
--- dbus/dbus/dbus-connection.c 2005-08-26 18:34:59.000000000 +0100
+++ dbus-verbose-null-path/dbus/dbus-connection.c 2005-10-06 17:24:50.000000000 +0100
@@ -391,7 +391,9 @@
_dbus_verbose ("Message %p (%d %s %s %s '%s' reply to %u) added to incoming queue %p, %d incoming\n",
message,
dbus_message_get_type (message),
- dbus_message_get_path (message),
+ dbus_message_get_path (message) ?
+ dbus_message_get_path (message) :
+ "no path",
dbus_message_get_interface (message) ?
dbus_message_get_interface (message) :
"no interface",
@@ -515,7 +517,9 @@
_dbus_verbose ("Message %p (%d %s %s %s '%s') removed from outgoing queue %p, %d left to send\n",
message,
dbus_message_get_type (message),
- dbus_message_get_path (message),
+ dbus_message_get_path (message) ?
+ dbus_message_get_path (message) :
+ "no path",
dbus_message_get_interface (message) ?
dbus_message_get_interface (message) :
"no interface",
@@ -2158,7 +2162,9 @@
_dbus_verbose ("Message %p (%d %s %s %s '%s') for %s added to outgoing queue %p, %d pending to send\n",
message,
dbus_message_get_type (message),
- dbus_message_get_path (message),
+ dbus_message_get_path (message) ?
+ dbus_message_get_path (message) :
+ "no path",
dbus_message_get_interface (message) ?
dbus_message_get_interface (message) :
"no interface",
@@ -3041,7 +3047,9 @@
_dbus_verbose ("Message %p (%d %s %s %s '%s') removed from incoming queue %p, %d incoming\n",
link->data,
dbus_message_get_type (link->data),
- dbus_message_get_path (link->data),
+ dbus_message_get_path (link->data) ?
+ dbus_message_get_path (link->data) :
+ "no path",
dbus_message_get_interface (link->data) ?
dbus_message_get_interface (link->data) :
"no interface",
More information about the dbus
mailing list