From 475a41beb3d6277fd0683ee06bedbd8cf52e8554 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 17 Jul 2019 12:31:12 +0200 Subject: [PATCH 1/2] address @dignifiedquire rustyness comment and fix changelog --- python/CHANGELOG | 6 ++++++ src/context.rs | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/python/CHANGELOG b/python/CHANGELOG index 0dfffc4e1..7a0c73b2a 100644 --- a/python/CHANGELOG +++ b/python/CHANGELOG @@ -4,6 +4,12 @@ - introduce automatic versioning via setuptools_scm, based on py-X.Y.Z tags +- integrate latest DCC core-rust with dc_close() fixes + +- provide a account.shutdown() method and improve termination + logic also in tests. also fixes output-clubbering during + test runs. + 0.600.0 --------- diff --git a/src/context.rs b/src/context.rs index 26e7427dc..ac8e7b4df 100644 --- a/src/context.rs +++ b/src/context.rs @@ -135,7 +135,7 @@ pub fn dc_context_new( userdata: *mut libc::c_void, os_name: *const libc::c_char, ) -> Context { - let context = Context { + Context { blobdir: Arc::new(RwLock::new(std::ptr::null_mut())), dbfile: Arc::new(RwLock::new(std::ptr::null_mut())), inbox: Arc::new(RwLock::new({ @@ -179,8 +179,7 @@ pub fn dc_context_new( ))), probe_imap_network: Arc::new(RwLock::new(0)), perform_inbox_jobs_needed: Arc::new(RwLock::new(0)), - }; - context + } } unsafe fn cb_receive_imf( From 5cac4b507615bddd4ab83ce3f5be96ccb6b4a6a1 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 17 Jul 2019 12:47:22 +0200 Subject: [PATCH 2/2] remove spurious print --- src/context.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/context.rs b/src/context.rs index ac8e7b4df..6911f7c1e 100644 --- a/src/context.rs +++ b/src/context.rs @@ -284,7 +284,6 @@ pub unsafe fn dc_context_unref(context: &mut Context) { } pub unsafe fn dc_close(context: &Context) { - println!("disconnecting inbox watch yooaa"); info!(context, 0, "disconnecting INBOX-watch",); context.inbox.read().unwrap().disconnect(context); info!(context, 0, "disconnecting sentbox-thread",);