Skip to content
forked from BOINC/boinc

Commit

Permalink
Merge pull request BOINC#4911 from Vulpine05/Vulpine05-3430
Browse files Browse the repository at this point in the history
Reset progress percentage to last checkpoint when task is initialized
  • Loading branch information
AenBleidd authored Sep 15, 2022
2 parents 52ccadd + a0b5435 commit 10b6bcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ void ACTIVE_TASK_SET::init() {
atp->read_task_state_file();
atp->current_cpu_time = atp->checkpoint_cpu_time;
atp->elapsed_time = atp->checkpoint_elapsed_time;
atp->fraction_done = atp->checkpoint_fraction_done;
}
}

Expand Down
5 changes: 3 additions & 2 deletions client/app_start.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2020 University of California
// Copyright (C) 2022 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
Expand Down Expand Up @@ -586,6 +586,7 @@ int ACTIVE_TASK::start(bool test) {

current_cpu_time = checkpoint_cpu_time;
elapsed_time = checkpoint_elapsed_time;
fraction_done = checkpoint_fraction_done;

graphics_request_queue.init(result->name); // reset message queues
process_control_queue.init(result->name);
Expand Down Expand Up @@ -702,7 +703,7 @@ int ACTIVE_TASK::start(bool test) {
char error_msg[1024];
char error_msg2[1024];
DWORD last_error = 0;

memset(&process_info, 0, sizeof(process_info));
memset(&startup_info, 0, sizeof(startup_info));
startup_info.cb = sizeof(startup_info);
Expand Down

0 comments on commit 10b6bcd

Please sign in to comment.