BackupHelper tasks will never get marked as cancelled

Bug #1614695 reported by Charles Kerr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Keeper
In Progress
Medium
Unassigned

Bug Description

In this block:

> if (n_uploaded_ == q_ptr->expected_size())
> {
> q_ptr->set_state(Helper::State::COMPLETE);
> }
> else if (read_error_ || write_error_ || n_uploaded_ != q_ptr->expected_size())
> {
> q_ptr->set_state(Helper::State::FAILED);
> }
> else if (cancelled_)
> {
> q_ptr->set_state(Helper::State::CANCELLED);
> }

We'll never reach the third else because any value of n_uploaded will either be
"== q_ptr->expected_size()" or
"!= q_ptr->expected_size()".

As written this block wrongly behaves as:

    q_ptr->set_state(n_uploaded == expected_size() ? COMPLETE : FAILED)

Related branches

Charles Kerr (charlesk)
summary: - BackupHelper tasks will never get marked as CANCELLED
+ BackupHelper tasks will never get marked as cancelled
Charles Kerr (charlesk)
Changed in keeper:
status: New → In Progress
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.