diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ea2cd0ba..57281bbaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,12 @@ - Update "accounts.toml" atomically - Don't let blocking be bypassed using groups #4316 +## [1.112.7] - 2023-04-17 + +### Fixes + +- Updated `async-imap` to v0.8.0 to fix erroneous EOF detection in long IMAP responses. + ## [1.112.6] - 2023-04-04 ### Changes @@ -2403,3 +2409,5 @@ https://github.com/deltachat/deltachat-core-rust/pulls?q=is%3Apr+is%3Aclosed [1.112.3]: https://github.com/deltachat/deltachat-core-rust/compare/v1.112.2...v1.112.3 [1.112.4]: https://github.com/deltachat/deltachat-core-rust/compare/v1.112.3...v1.112.4 [1.112.5]: https://github.com/deltachat/deltachat-core-rust/compare/v1.112.4...v1.112.5 +[1.112.6]: https://github.com/deltachat/deltachat-core-rust/compare/v1.112.5...v1.112.6 +[1.112.7]: https://github.com/deltachat/deltachat-core-rust/compare/v1.112.6...v1.112.7 diff --git a/Cargo.lock b/Cargo.lock index 89b75936b..fd823383b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -204,12 +204,11 @@ dependencies = [ [[package]] name = "async-imap" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8379e2f1cdeb79afd2006932d7e8f64993fc0f7386d0ebc37231c90b05968c25" +checksum = "d11e163a705d0c809dfc886eee95df5117c758539c940c0fe9aa3aa4da5388ce" dependencies = [ "async-channel", - "async-native-tls 0.4.0", "base64 0.21.0", "byte-pool", "chrono", @@ -234,18 +233,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-native-tls" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d57d4cec3c647232e1094dc013546c0b33ce785d8aeb251e1f20dfaf8a9a13fe" -dependencies = [ - "native-tls", - "thiserror", - "tokio", - "url", -] - [[package]] name = "async-native-tls" version = "0.5.0" @@ -553,9 +540,9 @@ checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byte-pool" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c7230ddbb427b1094d477d821a99f3f54d36333178eeb806e279bcdcecf0ca" +checksum = "c2f1b21189f50b5625efa6227cf45e9d4cfdc2e73582df2b879e9689e78a7158" dependencies = [ "crossbeam-queue", "stable_deref_trait", @@ -1157,13 +1144,13 @@ dependencies = [ [[package]] name = "deltachat" -version = "1.112.6" +version = "1.112.7" dependencies = [ "ansi_term", "anyhow", "async-channel", "async-imap", - "async-native-tls 0.5.0", + "async-native-tls", "async-smtp", "async_zip", "backtrace", @@ -1231,7 +1218,7 @@ dependencies = [ [[package]] name = "deltachat-jsonrpc" -version = "1.112.6" +version = "1.112.7" dependencies = [ "anyhow", "async-channel", @@ -1254,7 +1241,7 @@ dependencies = [ [[package]] name = "deltachat-repl" -version = "1.112.6" +version = "1.112.7" dependencies = [ "ansi_term", "anyhow", @@ -1269,7 +1256,7 @@ dependencies = [ [[package]] name = "deltachat-rpc-server" -version = "1.112.6" +version = "1.112.7" dependencies = [ "anyhow", "deltachat", @@ -1294,7 +1281,7 @@ dependencies = [ [[package]] name = "deltachat_ffi" -version = "1.112.6" +version = "1.112.7" dependencies = [ "anyhow", "deltachat", diff --git a/Cargo.toml b/Cargo.toml index 281aeeb41..961da7f1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat" -version = "1.112.6" +version = "1.112.7" edition = "2021" license = "MPL-2.0" rust-version = "1.65" @@ -35,7 +35,7 @@ ratelimit = { path = "./deltachat-ratelimit" } anyhow = "1" async-channel = "1.8.0" -async-imap = { version = "0.7.0", default-features = false, features = ["runtime-tokio"] } +async-imap = { version = "0.8.0", default-features = false, features = ["runtime-tokio"] } async-native-tls = { version = "0.5", default-features = false, features = ["runtime-tokio"] } async-smtp = { version = "0.9", default-features = false, features = ["runtime-tokio"] } async_zip = { version = "0.0.12", default-features = false, features = ["deflate", "fs"] } diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml index f6ed211e4..674dbbe93 100644 --- a/deltachat-ffi/Cargo.toml +++ b/deltachat-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat_ffi" -version = "1.112.6" +version = "1.112.7" description = "Deltachat FFI" edition = "2018" readme = "README.md" diff --git a/deltachat-jsonrpc/Cargo.toml b/deltachat-jsonrpc/Cargo.toml index 77787abd3..205ec6622 100644 --- a/deltachat-jsonrpc/Cargo.toml +++ b/deltachat-jsonrpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-jsonrpc" -version = "1.112.6" +version = "1.112.7" description = "DeltaChat JSON-RPC API" edition = "2021" default-run = "deltachat-jsonrpc-server" diff --git a/deltachat-jsonrpc/typescript/package.json b/deltachat-jsonrpc/typescript/package.json index e2743bba7..7409bbe60 100644 --- a/deltachat-jsonrpc/typescript/package.json +++ b/deltachat-jsonrpc/typescript/package.json @@ -55,5 +55,5 @@ }, "type": "module", "types": "dist/deltachat.d.ts", - "version": "1.112.6" -} + "version": "1.112.7" +} \ No newline at end of file diff --git a/deltachat-repl/Cargo.toml b/deltachat-repl/Cargo.toml index 3eca44d6a..7487bd32a 100644 --- a/deltachat-repl/Cargo.toml +++ b/deltachat-repl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-repl" -version = "1.112.6" +version = "1.112.7" license = "MPL-2.0" edition = "2021" diff --git a/deltachat-rpc-server/Cargo.toml b/deltachat-rpc-server/Cargo.toml index f66223ade..8e4f9ac9e 100644 --- a/deltachat-rpc-server/Cargo.toml +++ b/deltachat-rpc-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deltachat-rpc-server" -version = "1.112.6" +version = "1.112.7" description = "DeltaChat JSON-RPC server" edition = "2021" readme = "README.md" diff --git a/package.json b/package.json index 6716b8c01..d4be1a946 100644 --- a/package.json +++ b/package.json @@ -60,5 +60,5 @@ "test:mocha": "mocha -r esm node/test/test.js --growl --reporter=spec --bail --exit" }, "types": "node/dist/index.d.ts", - "version": "1.112.6" -} + "version": "1.112.7" +} \ No newline at end of file diff --git a/src/context.rs b/src/context.rs index c0a4b8621..627e63c78 100644 --- a/src/context.rs +++ b/src/context.rs @@ -256,7 +256,7 @@ enum RunningState { Running { cancel_sender: Sender<()> }, /// Cancel signal has been sent, waiting for ongoing process to be freed. - ShallStop, + ShallStop { request: Instant }, /// There is no ongoing process, a new one can be allocated. Stopped, @@ -509,6 +509,9 @@ impl Context { pub(crate) async fn free_ongoing(&self) { let mut s = self.running_state.write().await; + if let RunningState::ShallStop { request } = *s { + info!(self, "Ongoing stopped in {:?}", request.elapsed()); + } *s = RunningState::Stopped; } @@ -521,9 +524,11 @@ impl Context { warn!(self, "could not cancel ongoing: {:#}", err); } info!(self, "Signaling the ongoing process to stop ASAP.",); - *s = RunningState::ShallStop; + *s = RunningState::ShallStop { + request: Instant::now(), + }; } - RunningState::ShallStop | RunningState::Stopped => { + RunningState::ShallStop { .. } | RunningState::Stopped => { info!(self, "No ongoing process to stop.",); } } @@ -533,7 +538,7 @@ impl Context { pub(crate) async fn shall_stop_ongoing(&self) -> bool { match &*self.running_state.read().await { RunningState::Running { .. } => false, - RunningState::ShallStop | RunningState::Stopped => true, + RunningState::ShallStop { .. } | RunningState::Stopped => true, } } diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 128f71798..4d939b75c 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -50,7 +50,7 @@ use crate::blob::BlobDirContents; use crate::chat::{add_device_msg, delete_and_reset_all_device_msgs}; use crate::context::Context; use crate::message::{Message, Viewtype}; -use crate::qr::Qr; +use crate::qr::{self, Qr}; use crate::stock_str::backup_transfer_msg_body; use crate::{e2ee, EventType}; @@ -393,10 +393,14 @@ pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> { !context.is_configured().await?, "Cannot import backups to accounts in use." ); - let _guard = context.scheduler.pause(context.clone()).await?; - // Acquire global "ongoing" mutex. let cancel_token = context.alloc_ongoing().await?; + let _guard = context.scheduler.pause(context.clone()).await; + info!( + context, + "Running get_backup for {}", + qr::format_backup(&qr)? + ); let res = tokio::select! { biased; res = get_backup_inner(context, qr) => res,