mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Fixed the bug of passing connection request info
PiperOrigin-RevId: 592248269
This commit is contained in:
committed by
Copybara-Service
parent
63e744e133
commit
850c3e2788
@@ -44,7 +44,7 @@ void StartAdvertising(Core *pCore, const char *service_id,
|
||||
}
|
||||
connections::ConnectionRequestInfo crInfo;
|
||||
|
||||
crInfo.endpoint_info = ByteArray(info.endpoint_info);
|
||||
crInfo.endpoint_info = ByteArray(info.endpoint_info, info.endpoint_info_size);
|
||||
crInfo.listener = std::move(*(info.listener.GetImpl()));
|
||||
|
||||
connections::AdvertisingOptions advertising_options;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "connections/dart/core_adapter_dart.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -424,7 +425,8 @@ void StartAdvertisingDart(
|
||||
|
||||
ConnectionRequestInfoW info{
|
||||
connection_request_info_dart.endpoint_info,
|
||||
strlen(connection_request_info_dart.endpoint_info), listener};
|
||||
static_cast<size_t>(connection_request_info_dart.endpoint_info_size),
|
||||
listener};
|
||||
|
||||
ResultCallbackW callback;
|
||||
SetResultCallback(callback, result_cb);
|
||||
|
||||
@@ -132,6 +132,7 @@ struct ConnectionListenerDart {
|
||||
|
||||
struct ConnectionRequestInfoDart {
|
||||
// LINT.IfChange
|
||||
int endpoint_info_size;
|
||||
char *endpoint_info;
|
||||
ConnectionListenerDart connection_listener;
|
||||
// LINT.ThenChange(//depot/google3/location/nearby/apps/helloconnections/plugins/nearby_connections/platform/lib/types/connection_request_info.dart)
|
||||
|
||||
Reference in New Issue
Block a user