[tracker/tracker-0.6] Bugfix thumbnailer, when no items must be thumbnailed, don't send a request
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] Bugfix thumbnailer, when no items must be thumbnailed, don't send a request
- Date: Mon, 15 Jun 2009 11:40:26 -0400 (EDT)
commit fca9fc629d65b028cf6e674f4df551e83f117317
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Jun 15 17:40:12 2009 +0200
Bugfix thumbnailer, when no items must be thumbnailed, don't send a request
src/libtracker-common/tracker-thumbnailer.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-common/tracker-thumbnailer.c b/src/libtracker-common/tracker-thumbnailer.c
index d8a1e3c..45f1bb7 100644
--- a/src/libtracker-common/tracker-thumbnailer.c
+++ b/src/libtracker-common/tracker-thumbnailer.c
@@ -423,10 +423,34 @@ tracker_thumbnailer_queue_send (void)
TrackerThumbnailerPrivate *private;
GStrv uri_strv;
GStrv mime_type_strv;
+ guint len = 0;
private = g_static_private_get (&private_key);
g_return_if_fail (private != NULL);
+ if (private->uris) {
+ len = g_slist_length (private->uris);
+ }
+
+ if (!len) {
+ g_message ("Thumbnailer queue has no items ...");
+
+ if (private->uris) {
+ g_slist_free (private->uris);
+ private->uris = NULL;
+ }
+
+ if (private->mime_types) {
+ if (g_slist_length (private->mime_types) > 0) {
+ g_slist_foreach (private->mime_types, (GFunc) g_free, NULL);
+ }
+ g_slist_free (private->mime_types);
+ private->mime_types = NULL;
+ }
+
+ return;
+ }
+
uri_strv = tracker_dbus_slist_to_strv (private->uris);
mime_type_strv = tracker_dbus_slist_to_strv (private->mime_types);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]