mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Merge branch 'master' into release to roll forward cl/336363104.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "core/internal/message_lite.h"
|
||||
#include "core_v2/status.h"
|
||||
#include "proto/connections/offline_wire_formats.pb.h"
|
||||
#include "platform_v2/base/byte_array.h"
|
||||
|
||||
@@ -85,7 +86,14 @@ ByteArray ForConnectionResponse(std::int32_t status) {
|
||||
auto* v1_frame = frame.mutable_v1();
|
||||
v1_frame->set_type(V1Frame::CONNECTION_RESPONSE);
|
||||
auto* sub_frame = v1_frame->mutable_connection_response();
|
||||
|
||||
// For backward compatiblility, here still sets both status and response
|
||||
// parameters until the response feature is roll out in all supported
|
||||
// devices.
|
||||
sub_frame->set_status(status);
|
||||
sub_frame->set_response(status == Status::kSuccess
|
||||
? ConnectionResponseFrame::ACCEPT
|
||||
: ConnectionResponseFrame::REJECT);
|
||||
|
||||
return ToBytes(std::move(frame));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user