Skip to content

Commit

Permalink
[libfibre] fix receiving end of write tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelsadok committed Sep 1, 2021
1 parent 79a1f0b commit 50e3ece
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cpp/legacy_object_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,14 @@ Cont TheStateMachine::iteration(WriteArgs args) {
arg_num_ = args_.size() + start_arg;
status_ = kFibreInternalError;
changed_state = true;
return Cont1{kFibreOk, args.buf.begin()};
return Cont1{kFibreInternalError, args.buf.begin()};
}

} else {
arg_num_ = args_.size() + start_arg;
status_ = kFibreInternalError;
changed_state = true;
return Cont1{kFibreOk, args.buf.begin()};
return Cont1{kFibreInternalError, args.buf.begin()};
}
}
return Cont1{kFibreOk, args.buf.begin()};
Expand All @@ -469,7 +469,7 @@ Cont TheStateMachine::iteration(WriteArgs args) {
arg_num_ = args_.size() + start_arg;
status_ = kFibreInternalError;
changed_state = true;
return Cont1{kFibreOk, args.buf.begin()};
return Cont1{kFibreInternalError, args.buf.begin()};
}
chunks_[0] = Chunk{0, buf};
chunks_[1] = Chunk::frame_boundary(0);
Expand All @@ -480,7 +480,7 @@ Cont TheStateMachine::iteration(WriteArgs args) {
arg_num_ = args_.size() + start_arg;
status_ = kFibreInternalError;
changed_state = true;
return Cont1{kFibreOk, args.buf.begin()};
return Cont1{kFibreInternalError, args.buf.begin()};
}
}
return Cont1{kFibreOk, args.buf.begin()};
Expand Down
2 changes: 1 addition & 1 deletion cpp/libfibre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void LibFibreCtx::handle_tasks(LibFibreTask* tasks, size_t n_tasks) {
LibFibreCall* call = it->second;

WriteResult result = call->call->write({
{tasks[i].write.b_begin, from_c(tasks[i].write.c_begin), from_c(tasks[i].write.c_end), tasks[0].write.elevation},
{tasks[i].write.b_begin, from_c(tasks[i].write.c_begin), from_c(tasks[i].write.c_end), tasks[i].write.elevation},
from_c(tasks[i].write.status)});

if (result.is_busy()) {
Expand Down

0 comments on commit 50e3ece

Please sign in to comment.