[tracker/tracker-store-queue] tracker-turtle: Warn when trying to parse multiple files in parallel
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-store-queue] tracker-turtle: Warn when trying to parse multiple files in parallel
- Date: Tue, 26 May 2009 05:27:21 -0400 (EDT)
commit 981a3e8ec6ab9e65c26254b831d8b3464b32b299
Author: Jürg Billeter <j bitron ch>
Date: Mon May 25 18:50:11 2009 +0200
tracker-turtle: Warn when trying to parse multiple files in parallel
---
src/libtracker-data/tracker-turtle.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/libtracker-data/tracker-turtle.c b/src/libtracker-data/tracker-turtle.c
index 9981099..e14b3d1 100644
--- a/src/libtracker-data/tracker-turtle.c
+++ b/src/libtracker-data/tracker-turtle.c
@@ -34,8 +34,8 @@
#include "tracker-turtle.h"
static gboolean initialized = FALSE;
-static GMutex *turtle_mutex;
-static GCond *turtle_cond;
+static GMutex *turtle_mutex = NULL;
+static GCond *turtle_cond = NULL;
static gboolean turtle_first;
static gchar * volatile turtle_subject;
@@ -439,8 +439,10 @@ tracker_turtle_process (const gchar *turtle_file,
if (!initialized) {
g_critical ("Using tracker_turtle module without initialization");
+ return;
}
+ g_return_if_fail (turtle_mutex == NULL);
turtle_mutex = g_mutex_new ();
turtle_cond = g_cond_new ();
@@ -464,6 +466,8 @@ tracker_turtle_process (const gchar *turtle_file,
g_mutex_free (turtle_mutex);
g_cond_free (turtle_cond);
+ turtle_mutex = NULL;
+ turtle_cond = NULL;
}
void
@@ -532,8 +536,11 @@ tracker_turtle_reader_init (const gchar *turtle_file,
if (!initialized) {
g_critical ("Using tracker_turtle module without initialization");
+ return;
}
+ g_return_if_fail (turtle_mutex == NULL);
+
turtle_mutex = g_mutex_new ();
turtle_cond = g_cond_new ();
@@ -558,6 +565,8 @@ tracker_turtle_reader_next (void)
g_mutex_free (turtle_mutex);
g_cond_free (turtle_cond);
+ turtle_mutex = NULL;
+ turtle_cond = NULL;
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]