mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 17:06:35 +03:00
Use i32 instead of libc::c_int for try_again
It is already declared as i32 in the structure
This commit is contained in:
committed by
holger krekel
parent
900e3905c0
commit
c8aa8b55f6
@@ -133,7 +133,7 @@ impl Job {
|
|||||||
let connected = context.smtp.lock().unwrap().connect(context, &loginparam);
|
let connected = context.smtp.lock().unwrap().connect(context, &loginparam);
|
||||||
|
|
||||||
if !connected {
|
if !connected {
|
||||||
self.try_again_later(3i32, None);
|
self.try_again_later(3, None);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,7 +172,7 @@ impl Job {
|
|||||||
Err(err) => {
|
Err(err) => {
|
||||||
sock.disconnect();
|
sock.disconnect();
|
||||||
warn!(context, "smtp failed: {}", err);
|
warn!(context, "smtp failed: {}", err);
|
||||||
self.try_again_later(-1i32, Some(err.to_string()));
|
self.try_again_later(-1, Some(err.to_string()));
|
||||||
}
|
}
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
// smtp success, update db ASAP, then delete smtp file
|
// smtp success, update db ASAP, then delete smtp file
|
||||||
@@ -207,7 +207,7 @@ impl Job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this value does not increase the number of tries
|
// this value does not increase the number of tries
|
||||||
fn try_again_later(&mut self, try_again: libc::c_int, pending_error: Option<String>) {
|
fn try_again_later(&mut self, try_again: i32, pending_error: Option<String>) {
|
||||||
self.try_again = try_again;
|
self.try_again = try_again;
|
||||||
self.pending_error = pending_error;
|
self.pending_error = pending_error;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user