[gnote] Initialize SyncManager members properly
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Initialize SyncManager members properly
- Date: Sat, 26 Jan 2013 15:48:22 +0000 (UTC)
commit f65d3da7a67f87ebda28020bcb66382ab8d4a660
Author: Aurimas Äernius <aurisc4 gmail com>
Date: Sat Jan 26 17:44:55 2013 +0200
Initialize SyncManager members properly
Fixes ocasional crashes and hungs when launching syncronization.
Also add some debug output for this.
src/synchronization/syncmanager.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/synchronization/syncmanager.cpp b/src/synchronization/syncmanager.cpp
index bf38236..a18cfa5 100644
--- a/src/synchronization/syncmanager.cpp
+++ b/src/synchronization/syncmanager.cpp
@@ -44,6 +44,8 @@ namespace sync {
SyncManager::SyncManager(NoteManager & m)
: m_note_manager(m)
+ , m_state(IDLE)
+ , m_sync_thread(NULL)
{
}
@@ -94,11 +96,13 @@ namespace sync {
if(m_sync_thread != NULL) {
// A synchronization thread is already running
// TODO: Start new sync if existing dlg is for finished sync
+ DBG_OUT("A synchronization thread is already running");
m_sync_ui->present_ui();
return;
}
m_sync_ui = sync_ui;
+ DBG_OUT("Creating synchronization thread");
m_sync_thread = Glib::Thread::create(sigc::mem_fun(*this, &SyncManager::synchronization_thread), false);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]