Mir

Merge lp:~albaguirre/mir/fix-1522093 into lp:mir

Proposed by Alberto Aguirre
Status: Merged
Approved by: Alberto Aguirre
Approved revision: no longer in the source branch.
Merged at revision: 3162
Proposed branch: lp:~albaguirre/mir/fix-1522093
Merge into: lp:mir
Diff against target: 16 lines (+5/-1)
1 file modified
src/server/frontend/session_mediator.cpp (+5/-1)
To merge this branch: bzr merge lp:~albaguirre/mir/fix-1522093
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Alan Griffiths Approve
Review via email: mp+279305@code.launchpad.net

Commit message

session mediator: exchange_buffer: throw when unable to retrieve a buffer for the given stream id

Description of the change

session mediator: exchange_buffer: throw when unable to retrieve a buffer for the given stream id

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

alright

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/frontend/session_mediator.cpp'
2--- src/server/frontend/session_mediator.cpp 2015-11-26 10:44:43 +0000
3+++ src/server/frontend/session_mediator.cpp 2015-12-02 16:46:58 +0000
4@@ -354,7 +354,11 @@
5 mg::BufferID const buffer_id{static_cast<uint32_t>(request->buffer().buffer_id())};
6
7 mfd::ProtobufBufferPacker request_msg{const_cast<mir::protobuf::Buffer*>(&request->buffer())};
8- ipc_operations->unpack_buffer(request_msg, *buffer_stream_tracker.last_buffer(stream_id));
9+ auto buffer = buffer_stream_tracker.last_buffer(stream_id);
10+ if (!buffer)
11+ BOOST_THROW_EXCEPTION(std::logic_error("No buffer found for given stream id"));
12+
13+ ipc_operations->unpack_buffer(request_msg, *buffer);
14
15 auto const session = weak_session.lock();
16 if (!session)

Subscribers

People subscribed via source and target branches