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

Liu, Raymond
2008-12-24T05:05:51Z

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

Hi Marcel

>
>You should really start thinking for the error => return paradigm all
>the time. This makes the code a lot simpler to read.
>
>Regards
>Marcel
>

OK, Got it. Resent

Raymond

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

From baea853a2338b65feb68e0103ef8795467cada7d 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 | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

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

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