Mir

Merge lp://qastaging/~albaguirre/mir/fix-1519998 into lp://qastaging/mir

Proposed by Alberto Aguirre
Status: Merged
Approved by: Alexandros Frantzis
Approved revision: no longer in the source branch.
Merged at revision: 3152
Proposed branch: lp://qastaging/~albaguirre/mir/fix-1519998
Merge into: lp://qastaging/mir
Diff against target: 291 lines (+118/-19)
4 files modified
include/client/mir_toolkit/mir_buffer_stream.h (+3/-0)
src/client/buffer_stream.cpp (+20/-8)
src/client/buffer_stream.h (+15/-7)
tests/unit-tests/client/test_client_buffer_stream.cpp (+80/-4)
To merge this branch: bzr merge lp://qastaging/~albaguirre/mir/fix-1519998
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Approve
Review via email: mp+278662@code.qastaging.launchpad.net

Commit message

client buffer stream: always signal wait handle and invoke callback even during creation errors

The wait handle given to the client should always be signaled and the client supplied callback must be invoked
even if the server fails to create the buffer stream.

Clients can use mir_buffer_stream_is_valid to determine if a buffer stream was created succesfully.

Description of the change

client buffer stream: always signal wait handle and invoke callback even during creation errors

The wait handle given to the client should always be signaled and the client supplied callback must be invoked
even if the server fails to create the buffer stream.

Clients can use mir_buffer_stream_is_valid to determine if a buffer stream was created succesfully.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

+ std::unique_ptr<gp::Closure> closure{gp::NewCallback(this, &mcl::BufferStream::created, callback, context)};
...
+ closure.release();

This seems a bit awkward. I think it better to use gp::NewPermanentCallback and not need the release to avoid a double delete.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> + std::unique_ptr<gp::Closure> closure{gp::NewCallback(this,
> &mcl::BufferStream::created, callback, context)};
> ...
> + closure.release();
>
> This seems a bit awkward. I think it better to use gp::NewPermanentCallback
> and not need the release to avoid a double delete.

I guess that's a mild "Needs Fixing"

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

+ std::unique_ptr<google::protobuf::Closure> closure;

could be const

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

CI network failure, reapproving.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches