Commit fcf5ef0a authored by Martyn James Russell's avatar Martyn James Russell

Make sure we initialise GError to NULL. Also use the error in the print

	* 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.

svn path=/trunk/; revision=2912
parent 90b3c0d8
2009-02-10 Martyn Russell <martyn@imendio.com>
* 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.
2009-02-10 Mikael Ottela <mikael.ottela@ixonos.com>
* src/libtracker-common/tracker-type-utils.c: Handle ISO 8601 that
......
......@@ -695,15 +695,16 @@ backup_user_metadata (TrackerConfig *config, TrackerLanguage *language)
* 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 @@ crawling_finished_cb (TrackerProcessor *processor, gpointer user_data)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment