address @dignifiedquire comments

This commit is contained in:
holger krekel
2019-07-18 00:06:05 +02:00
parent 5cac4b5076
commit 0b37167be8
7 changed files with 49 additions and 23 deletions

View File

@@ -1248,15 +1248,20 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: *mut dc_j
}
}
if imap_connected_here {
// XXX why do we want to disconnect here?
// context.inbox.read().unwrap().disconnect(context);
info!(context, 0, "Skipping INBOX/IMAP disconnect");
}
if smtp_connected_here {
// XXX why do we want to disconnect here?
// context.smtp.clone().lock().unwrap().disconnect();
info!(context, 0, "Skipping SMTP disconnect");
if !success {
// disconnect if configure did not succeed
if imap_connected_here {
// context.inbox.read().unwrap().disconnect(context);
}
if smtp_connected_here {
// context.smtp.clone().lock().unwrap().disconnect();
}
} else {
assert!(imap_connected_here && smtp_connected_here);
info!(
context,
0, "Keeping IMAP/SMTP connections open after successful configuration"
);
}
dc_loginparam_unref(param);
dc_loginparam_unref(param_autoconfig);

View File

@@ -60,7 +60,6 @@ pub unsafe fn dc_perform_imap_jobs(context: &Context) {
}
unsafe fn dc_job_perform(context: &Context, thread: libc::c_int, probe_network: libc::c_int) {
// info!(context, 0, "dc_job_perform {} {}", thread, probe_network);
let mut select_stmt: *mut sqlite3_stmt;
let mut job = dc_job_t {
job_id: 0,
@@ -127,7 +126,6 @@ unsafe fn dc_job_perform(context: &Context, thread: libc::c_int, probe_network:
let mut tries: libc::c_int = 0i32;
while tries <= 1i32 {
job.try_again = 0i32;
// info!(context, 0, "dc_job_perform action {}", job.action);
match job.action {
5901 => {
dc_job_do_DC_JOB_SEND(context, &mut job);

View File

@@ -1060,7 +1060,7 @@ impl Imap {
let (sender, receiver) = std::sync::mpsc::channel();
let v = self.watch.clone();
warn!(context, 0, "IMAP-IDLE SPAWNING");
info!(context, 0, "IMAP-IDLE SPAWNING");
std::thread::spawn(move || {
let &(ref lock, ref cvar) = &*v;
if let Some(ref mut session) = &mut *session.lock().unwrap() {