switch to while instead of loop

This commit is contained in:
Simon Laux
2019-08-29 09:50:23 +02:00
committed by holger krekel
parent 85f182067c
commit 4f9f67a477

View File

@@ -115,20 +115,20 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: &Job) {
const STEP_3_INDEX: u8 = 13;
let mut step_counter: u8 = 0;
loop {
while !s.shall_stop_ongoing {
step_counter = step_counter + 1;
if s.shall_stop_ongoing {
// if step_counter == 3 {
// // Skip Autoconfig? (ok_to_continue 7)
// // But wouldn't it need to reset s.shall_stop_ongoing then, too?
// // It needs to run sth. but fail afterwards anyway, I'm still not sure about this, because the C code doesn't work like this so I guess we should ignore it
// step_counter = STEP_3_INDEX;
// } else {
// break;
// }
break;
}
// if s.shall_stop_ongoing {
// if step_counter == 3 {
// // Skip Autoconfig? (ok_to_continue 7)
// // But wouldn't it need to reset s.shall_stop_ongoing then, too?
// // It needs to run sth. but fail afterwards anyway, I'm still not sure about this, because the C code doesn't work like this so I guess we should ignore it
// step_counter = STEP_3_INDEX;
// } else {
// break;
// }
// break;
// }
let success = match step_counter {
// Read login parameters from the database