From 5512f7994118b3466a9dc4f68ab2183c61991da6 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Sun, 15 Jan 2017 12:38:06 +0100 Subject: [PATCH] Populate rpc response data properly --- src/anbox/rpc/message_processor.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/anbox/rpc/message_processor.cpp b/src/anbox/rpc/message_processor.cpp index c1a9d95a..90e70efb 100644 --- a/src/anbox/rpc/message_processor.cpp +++ b/src/anbox/rpc/message_processor.cpp @@ -64,7 +64,13 @@ bool MessageProcessor::process_data(const std::vector &data) { auto result = make_protobuf_object(); result->ParseFromArray(buffer_.data() + header_size, message_size); - if (result->has_id()) pending_calls_->complete_response(*result); + if (result->has_id()) { + pending_calls_->populate_message_for_result(*result, + [&](google::protobuf::MessageLite *result_message) { + result_message->ParseFromString(result->response()); + }); + pending_calls_->complete_response(*result); + } for (int n = 0; n < result->events_size(); n++) process_event_sequence(result->events(n)); -- GitLab