tracker r1681 - branches/xesam-support/src/trackerd
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1681 - branches/xesam-support/src/trackerd
- Date: Fri, 13 Jun 2008 15:08:30 +0000 (UTC)
Author: pvanhoof
Date: Fri Jun 13 15:08:30 2008
New Revision: 1681
URL: http://svn.gnome.org/viewvc/tracker?rev=1681&view=rev
Log:
No more blocking of the mainloop
Modified:
branches/xesam-support/src/trackerd/tracker-crawler.c
Modified: branches/xesam-support/src/trackerd/tracker-crawler.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-crawler.c (original)
+++ branches/xesam-support/src/trackerd/tracker-crawler.c Fri Jun 13 15:08:30 2008
@@ -731,10 +731,16 @@
crawler);
}
+typedef struct {
+ GStrv files;
+ TrackerCrawler *crawler;
+} SomeInfo;
+
static void
on_process_files_cb (DBusGProxy *proxy, GError *error, gpointer user_data)
{
- GStrv files = user_data;
+ SomeInfo *info = user_data;
+ GStrv files = info->files;
if (error) {
g_critical ("Could not send %d files to indexer to process, %s",
@@ -746,32 +752,33 @@
}
g_strfreev (files);
+ g_object_unref (info->crawler);
+ g_slice_free (SomeInfo, info);
}
static void
on_get_running (DBusGProxy *proxy, gboolean running, GError *error, gpointer user_data)
{
- TrackerCrawler *crawler = user_data;
- gchar ** files;
-
if (!error && running) {
+ SomeInfo *info = g_slice_new (SomeInfo);
+ info->crawler = user_data;
+
g_debug ("Processing file queue...");
- files = tracker_dbus_async_queue_to_strv (crawler->priv->files,
+ info->files = tracker_dbus_async_queue_to_strv (info->crawler->priv->files,
FILES_QUEUE_PROCESS_MAX);
- g_debug ("Sending %d files to indexer to process", g_strv_length (files));
+ g_debug ("Sending %d files to indexer to process", g_strv_length (info->files));
org_freedesktop_Tracker_Indexer_process_files_async (proxy,
- (const gchar **) files,
+ (const gchar **) info->files,
on_process_files_cb,
- files);
+ info);
} else {
g_message ("Couldn't process files, %s",
error ? error->message : "indexer not running");
}
- g_object_unref (crawler);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]