PATCH: dbus_message_get_path can return NULL.
John (J5) Palmieri
johnp at redhat.com
Thu Oct 6 14:46:41 PDT 2005
Looks good. Thanks.
On Thu, 2005-10-06 at 20:09 +0100, Michael Krivoruchko wrote:
> Hi,
>
> Attached patch fixes segfault when verbose mode in use and
> dbus_message_get_path returns NULL for current message.
>
> Misha
> --
> plain text document attachment (dbus-verbose-null-path.diff)
> 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",
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
--
More information about the dbus
mailing list