diff --git a/Cargo.lock b/Cargo.lock index 42bffe9042..b8ae2c8af7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1110,6 +1110,7 @@ dependencies = [ "futures", "futures-lite", "hex", + "hickory-resolver", "humansize", "image", "iroh", @@ -1156,7 +1157,6 @@ dependencies = [ "tokio-tar", "tokio-util", "toml", - "trust-dns-resolver", "url", "uuid", ] @@ -2205,6 +2205,51 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hickory-proto" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.8.5", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.3" @@ -5041,52 +5086,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "trust-dns-proto" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc775440033cb114085f6f2437682b194fa7546466024b1037e82a48a052a69" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna", - "ipnet", - "once_cell", - "rand 0.8.5", - "smallvec", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff7aed33ef3e8bf2c9966fccdfed93f93d46f432282ea875cd66faabc6ef2f" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lru-cache", - "once_cell", - "parking_lot", - "rand 0.8.5", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "tracing", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.4" diff --git a/Cargo.toml b/Cargo.toml index 55dc0bb5f3..e717202657 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,6 +53,7 @@ fd-lock = "3.0.11" futures = "0.3" futures-lite = "1.13.0" hex = "0.4.0" +hickory-resolver = "0.24" humansize = "2" image = { version = "0.24.7", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } iroh = { version = "0.4.1", default-features = false } @@ -93,7 +94,6 @@ tokio-stream = { version = "0.1.14", features = ["fs"] } tokio-tar = { version = "0.3" } # TODO: integrate tokio into async-tar tokio-util = "0.7.9" toml = "0.7" -trust-dns-resolver = "0.23" url = "2" uuid = { version = "1", features = ["serde", "v4"] } diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index a2cbb72dc4..ab4d746d45 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -384,7 +384,12 @@ char* dc_get_blobdir (const dc_context_t* context); /** * Configure the context. The configuration is handled by key=value pairs as: * - * - `addr` = address to display (always needed) + * - `addr` = Email address to use for configuration. + * If dc_configure() fails this is not the email address actually in use. + * Use `configured_addr` to find out the email address actually in use. + * - `configured_addr` = Email address actually in use. + * Unless for testing, do not set this value using dc_set_config(). + * Instead, set `addr` and call dc_configure(). * - `mail_server` = IMAP-server, guessed if left out * - `mail_user` = IMAP-username, guessed if left out * - `mail_pw` = IMAP-password (always needed) diff --git a/src/provider.rs b/src/provider.rs index f6235025a3..c79815c6c3 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -3,7 +3,7 @@ mod data; use anyhow::Result; -use trust_dns_resolver::{config, AsyncResolver, TokioAsyncResolver}; +use hickory_resolver::{config, AsyncResolver, TokioAsyncResolver}; use crate::config::Config; use crate::context::Context; diff --git a/src/sql/migrations.rs b/src/sql/migrations.rs index 5d5116c59b..a1815652f8 100644 --- a/src/sql/migrations.rs +++ b/src/sql/migrations.rs @@ -730,21 +730,22 @@ CREATE INDEX smtp_messageid ON imap(rfc724_mid); ) .await?; } + + // Add is_bot column to contacts table with default false. if dbversion < 102 { sql.execute_migration( - "CREATE TABLE download ( - msg_id INTEGER NOT NULL -- id of the message stub in msgs table - )", + "ALTER TABLE contacts ADD COLUMN is_bot INTEGER NOT NULL DEFAULT 0", 102, ) .await?; } - // Add is_bot column to contacts table with default false. - if dbversion < 102 { + if dbversion < 103 { sql.execute_migration( - "ALTER TABLE contacts ADD COLUMN is_bot INTEGER NOT NULL DEFAULT 0", - 102, + "CREATE TABLE download ( + msg_id INTEGER NOT NULL -- id of the message stub in msgs table + )", + 103, ) .await?; }