[tracker/quad] Closing the stream before the callback happens in case of error



commit 2b1b6685f82bc234459eb708768a360f670ecfdc
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Jul 24 15:15:18 2009 +0200

    Closing the stream before the callback happens in case of error

 src/libtracker-db/tracker-db-backup.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-backup.c b/src/libtracker-db/tracker-db-backup.c
index d128149..c9c525f 100644
--- a/src/libtracker-db/tracker-db-backup.c
+++ b/src/libtracker-db/tracker-db-backup.c
@@ -187,6 +187,10 @@ on_backup_stageone_finished (gpointer user_data)
 		             TRACKER_DB_BACKUP_ERROR_UNKNOWN,
 		             "%s", sqlite3_errmsg (info->db));
 
+		if (info->stream) {
+			g_output_stream_close (info->stream, NULL, &info->error);
+		}
+
 		perform_callback (info);
 
 		backup_info_free (info);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]