[tracker/rss-enclosures] tracker-store: Make sure ALL requests increment the request_id



commit de068e74fec6a02891b4525bbb8042833bbf4172
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Jun 21 15:44:06 2010 +0100

    tracker-store: Make sure ALL requests increment the request_id
    
    Don't filter erroneous requests, it is important to log and know about
    broken incoming requests so they can be fixed

 src/tracker-store/tracker-steroids.c |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)
---
diff --git a/src/tracker-store/tracker-steroids.c b/src/tracker-store/tracker-steroids.c
index 575d9f5..e4a680b 100644
--- a/src/tracker-store/tracker-steroids.c
+++ b/src/tracker-store/tracker-steroids.c
@@ -366,7 +366,7 @@ steroids_query (TrackerSteroids *steroids,
                 DBusConnection  *connection,
                 DBusMessage     *message)
 {
-	ClientInfo  *info;
+	ClientInfo *info;
 	guint request_id;
 	const gchar *sender;
 	DBusMessage *reply;
@@ -374,6 +374,12 @@ steroids_query (TrackerSteroids *steroids,
 	gchar *query;
 	const gchar *expected_signature;
 
+	request_id = tracker_dbus_get_next_request_id ();
+	tracker_dbus_request_new (request_id,
+	                          NULL,
+	                          "%s()",
+	                          __FUNCTION__);
+
 	expected_signature = DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_UNIX_FD_AS_STRING;
 
 	if (g_strcmp0 (dbus_message_get_signature (message), expected_signature)) {
@@ -388,13 +394,6 @@ steroids_query (TrackerSteroids *steroids,
 		return;
 	}
 
-	request_id = tracker_dbus_get_next_request_id ();
-
-	tracker_dbus_request_new (request_id,
-	                          NULL,
-	                          "%s()",
-	                          __FUNCTION__);
-
 	info = g_slice_new0 (ClientInfo);
 	info->connection = dbus_connection_ref (connection);
 	info->call_message = dbus_message_ref (message);
@@ -447,6 +446,12 @@ steroids_update (TrackerSteroids *steroids,
 	DBusMessage *reply;
 	gchar *query;
 
+	request_id = tracker_dbus_get_next_request_id ();
+	tracker_dbus_request_new (request_id,
+	                          NULL,
+	                          "%s()",
+	                          __FUNCTION__);
+
 	if (g_strcmp0 (dbus_message_get_signature (message), DBUS_TYPE_UNIX_FD_AS_STRING)) {
 		reply = dbus_message_new_error_printf (message,
 		                                       DBUS_ERROR_UNKNOWN_METHOD,
@@ -459,13 +464,6 @@ steroids_update (TrackerSteroids *steroids,
 		return;
 	}
 
-	request_id = tracker_dbus_get_next_request_id ();
-
-	tracker_dbus_request_new (request_id,
-	                          NULL,
-	                          "%s()",
-	                          __FUNCTION__);
-
 	info = g_slice_new0 (ClientInfo);
 	info->connection = dbus_connection_ref (connection);
 	info->call_message = dbus_message_ref (message);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]