mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
remove print statements and fix a crash
This commit is contained in:
@@ -24,3 +24,4 @@ default = ["vendored", "nightly", "ringbuf"]
|
|||||||
vendored = ["deltachat/vendored"]
|
vendored = ["deltachat/vendored"]
|
||||||
nightly = ["deltachat/nightly"]
|
nightly = ["deltachat/nightly"]
|
||||||
ringbuf = ["deltachat/ringbuf"]
|
ringbuf = ["deltachat/ringbuf"]
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
if !success {
|
||||||
// disconnect if configure did not succeed
|
// disconnect if configure did not succeed
|
||||||
if imap_connected_here {
|
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"
|
0, "Keeping IMAP/SMTP connections open after successful configuration"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if ongoing_allocated_here {
|
if ongoing_allocated_here {
|
||||||
dc_free_ongoing(context);
|
dc_free_ongoing(context);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -719,6 +719,9 @@ impl Imap {
|
|||||||
}
|
}
|
||||||
let entry = as_str(val1);
|
let entry = as_str(val1);
|
||||||
|
|
||||||
|
if entry.is_empty() {
|
||||||
|
return (0, 0);
|
||||||
|
}
|
||||||
// the entry has the format `imap.mailbox.<folder>=<uidvalidity>:<lastseenuid>`
|
// the entry has the format `imap.mailbox.<folder>=<uidvalidity>:<lastseenuid>`
|
||||||
let mut parts = entry.split(':');
|
let mut parts = entry.split(':');
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ impl Sql {
|
|||||||
G: FnMut(rusqlite::MappedRows<F>) -> Result<H>,
|
G: FnMut(rusqlite::MappedRows<F>) -> Result<H>,
|
||||||
{
|
{
|
||||||
self.with_conn(|conn| {
|
self.with_conn(|conn| {
|
||||||
eprintln!("query_map {}", sql.as_ref());
|
|
||||||
let mut stmt = conn.prepare(sql.as_ref())?;
|
let mut stmt = conn.prepare(sql.as_ref())?;
|
||||||
let res = stmt.query_map(params, f)?;
|
let res = stmt.query_map(params, f)?;
|
||||||
g(res)
|
g(res)
|
||||||
@@ -1126,7 +1125,6 @@ mod test {
|
|||||||
maybe_add_file(&mut files, "$BLOBDIR/world.txt");
|
maybe_add_file(&mut files, "$BLOBDIR/world.txt");
|
||||||
maybe_add_file(&mut files, "world2.txt");
|
maybe_add_file(&mut files, "world2.txt");
|
||||||
|
|
||||||
println!("{:?}", files);
|
|
||||||
assert!(unsafe {
|
assert!(unsafe {
|
||||||
is_file_in_use(
|
is_file_in_use(
|
||||||
&mut files,
|
&mut files,
|
||||||
|
|||||||
Reference in New Issue
Block a user