[patch] obexd: if path == NULL, don't call dbus_connection_get_object_path_data

Liu, Raymond
2008-12-24T03:13:50Z

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

Hi

Just a minor fix for g_dbus_unregister_interface to avoid calling dbus_connection_get_object_path_data when path is NULL.

Best Regards,
Raymond Liu

[-- Attachment #2: 0001-bug-fix-if-path-NULL-don-t-call-dbus_connection.patch --]
[-- Type: application/octet-stream, Size: 792 bytes --]

From ad7ab3dfe96fed455f39bea2181e71603515ffda Mon Sep 17 00:00:00 2001
From: Raymond Liu <raymond.liu@intel.com>
Date: Wed, 24 Dec 2008 10:54:47 +0800
Subject: [PATCH] bug fix: if path == NULL, don't call dbus_connection_get_object_path_data

---
gdbus/object.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 432a8a0..1c8bcc4 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -494,7 +494,7 @@ gboolean g_dbus_unregister_interface(DBusConnection *connection,
struct generic_data *data = NULL;
struct interface_data *iface;

- if (dbus_connection_get_object_path_data(connection, path,
+ if (!path || dbus_connection_get_object_path_data(connection, path,
(void *) &data) == FALSE)
return FALSE;

--
1.5.6.3