remove print statements and fix a crash

This commit is contained in:
holger krekel
2019-07-18 12:52:02 +02:00
parent ee317cb1b5
commit 7d0b5d8abb
4 changed files with 12 additions and 2 deletions

View File

@@ -1039,7 +1039,14 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: *mut dc_j
}
}
}
if imap_connected_here {
context.inbox.read().unwrap().disconnect(context);
}
if smtp_connected_here {
context.smtp.clone().lock().unwrap().disconnect();
}
/*
if !success {
// disconnect if configure did not succeed
if imap_connected_here {
@@ -1055,6 +1062,7 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: *mut dc_j
0, "Keeping IMAP/SMTP connections open after successful configuration"
);
}
*/
if ongoing_allocated_here {
dc_free_ongoing(context);
}

View File

@@ -719,6 +719,9 @@ impl Imap {
}
let entry = as_str(val1);
if entry.is_empty() {
return (0, 0);
}
// the entry has the format `imap.mailbox.<folder>=<uidvalidity>:<lastseenuid>`
let mut parts = entry.split(':');
(

View File

@@ -110,7 +110,6 @@ impl Sql {
G: FnMut(rusqlite::MappedRows<F>) -> Result<H>,
{
self.with_conn(|conn| {
eprintln!("query_map {}", sql.as_ref());
let mut stmt = conn.prepare(sql.as_ref())?;
let res = stmt.query_map(params, f)?;
g(res)
@@ -1126,7 +1125,6 @@ mod test {
maybe_add_file(&mut files, "$BLOBDIR/world.txt");
maybe_add_file(&mut files, "world2.txt");
println!("{:?}", files);
assert!(unsafe {
is_file_in_use(
&mut files,