[tracker] tracker-extract: check if user_data expected one only if proper message path and interface
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: check if user_data expected one only if proper message path and interface
- Date: Tue, 20 Jul 2010 15:07:30 +0000 (UTC)
commit 52e3291e32a79324aff204dc75e03e93619035fe
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Jul 20 17:06:52 2010 +0200
tracker-extract: check if user_data expected one only if proper message path and interface
src/tracker-extract/tracker-extract.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index 223d18e..8817d01 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -824,9 +824,6 @@ tracker_extract_connection_filter (DBusConnection *connection,
g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- extract = user_data;
- g_return_val_if_fail (TRACKER_IS_EXTRACT (extract), DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
if (g_strcmp0 (TRACKER_EXTRACT_PATH, dbus_message_get_path (message))) {
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -835,6 +832,11 @@ tracker_extract_connection_filter (DBusConnection *connection,
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
+ /* Only check if the user_data is our TrackerExtract AFTER having checked that
+ * the message matches expected path and interface. */
+ extract = user_data;
+ g_return_val_if_fail (TRACKER_IS_EXTRACT (extract), DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
+
if (!g_strcmp0 ("GetMetadataFast", dbus_message_get_member (message))) {
get_metadata_fast (extract, connection, message);
return DBUS_HANDLER_RESULT_HANDLED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]