mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
Refine type of SmtpState.probe_network to bool
This commit is contained in:
@@ -109,7 +109,7 @@ pub struct SmtpState {
|
||||
pub suspended: i32,
|
||||
pub doing_jobs: i32,
|
||||
pub perform_jobs_needed: i32,
|
||||
pub probe_network: i32,
|
||||
pub probe_network: bool,
|
||||
}
|
||||
|
||||
// create/open/config/information
|
||||
|
||||
@@ -1042,7 +1042,7 @@ pub unsafe fn dc_perform_smtp_jobs(context: &Context) {
|
||||
let mut state = lock.lock().unwrap();
|
||||
|
||||
let probe_smtp_network = state.probe_network;
|
||||
state.probe_network = 0;
|
||||
state.probe_network = false;
|
||||
state.perform_jobs_needed = 0;
|
||||
|
||||
if 0 != state.suspended {
|
||||
@@ -1050,7 +1050,7 @@ pub unsafe fn dc_perform_smtp_jobs(context: &Context) {
|
||||
return;
|
||||
}
|
||||
state.doing_jobs = 1;
|
||||
probe_smtp_network != 0
|
||||
probe_smtp_network
|
||||
};
|
||||
|
||||
info!(context, 0, "SMTP-jobs started...",);
|
||||
@@ -1123,7 +1123,7 @@ pub unsafe fn dc_maybe_network(context: &Context) {
|
||||
{
|
||||
let &(ref lock, _) = &*context.smtp_state.clone();
|
||||
let mut state = lock.lock().unwrap();
|
||||
state.probe_network = 1;
|
||||
state.probe_network = true;
|
||||
|
||||
*context.probe_imap_network.write().unwrap() = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user