tracker r2912 - in trunk: . src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2912 - in trunk: . src/trackerd
- Date: Tue, 10 Feb 2009 18:00:06 +0000 (UTC)
Author: mr
Date: Tue Feb 10 18:00:06 2009
New Revision: 2912
URL: http://svn.gnome.org/viewvc/tracker?rev=2912&view=rev
Log:
* src/trackerd/tracker-main.c: (crawling_finished_cb): Make sure
we initialise GError to NULL. Also use the error in the print
statement if it is set and make sure we also free it. If we do
fail (i.e. error != NULL) we now don't try to rename the ttl file.
Modified:
trunk/ChangeLog
trunk/src/trackerd/tracker-main.c
Modified: trunk/src/trackerd/tracker-main.c
==============================================================================
--- trunk/src/trackerd/tracker-main.c (original)
+++ trunk/src/trackerd/tracker-main.c Tue Feb 10 18:00:06 2009
@@ -695,15 +695,16 @@
* Saving the last backup file to help with debugging.
*/
static void
-crawling_finished_cb (TrackerProcessor *processor, gpointer user_data)
+crawling_finished_cb (TrackerProcessor *processor,
+ gpointer user_data)
{
- gulong *callback_id = user_data;
- GError *error;
+ GError *error = NULL;
+ gulong *callback_id;
static gint counter = 0;
- counter += 1;
+ callback_id = user_data;
- if (counter >= 2) {
+ if (++counter >= 2) {
gchar *rebackup;
g_debug ("Uninstalling initial crawling callback");
@@ -714,6 +715,13 @@
get_ttl_backup_filename (),
&error);
+ if (error) {
+ g_message ("Could not restore backup, %s",
+ error->message);
+ g_free (error);
+ return;
+ }
+
rebackup = g_strdup_printf ("%s.old",
get_ttl_backup_filename ());
g_rename (get_ttl_backup_filename (), rebackup);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]