remove ok_to_continue and simplify/refactor imap and smtp connection trying

address @r10s review comments and also remove unneccessary "unsafe fn"
This commit is contained in:
holger krekel
2019-10-07 01:40:15 +02:00
parent ba5b3ad675
commit 7f5b362eda
4 changed files with 127 additions and 155 deletions

View File

@@ -384,7 +384,7 @@ impl Imap {
return true;
}
let server_flags = self.config.read().unwrap().server_flags;
let server_flags = self.config.read().unwrap().server_flags as i32;
let connection_res: imap::error::Result<Client> =
if (server_flags & (DC_LP_IMAP_SOCKET_STARTTLS | DC_LP_IMAP_SOCKET_PLAIN)) != 0 {