mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Internal change
PiperOrigin-RevId: 360686330
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "platform/base/prng.h"
|
||||
#include "platform/public/logging.h"
|
||||
#include "platform/public/mutex_lock.h"
|
||||
#include "absl/strings/escaping.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
@@ -106,10 +107,10 @@ bool Ble::StartAdvertising(const std::string& service_id,
|
||||
|
||||
if (!medium_.StartAdvertising(service_id, medium_advertisement_bytes,
|
||||
fast_advertisement_service_uuid)) {
|
||||
NEARBY_LOGS(INFO)
|
||||
NEARBY_LOGS(ERROR)
|
||||
<< "Failed to turn on BLE advertising with advertisement bytes="
|
||||
<< advertisement_bytes.data() << "(" << advertisement_bytes.size()
|
||||
<< ")"
|
||||
<< absl::BytesToHexString(advertisement_bytes.data())
|
||||
<< ", size=" << advertisement_bytes.size()
|
||||
<< ", fast advertisement service uuid="
|
||||
<< fast_advertisement_service_uuid;
|
||||
return false;
|
||||
|
||||
@@ -1051,9 +1051,10 @@ proto::connections::Medium P2pClusterPcpHandler::StartBleAdvertising(
|
||||
|
||||
if (!ble_medium_.StartAdvertising(service_id, advertisement_bytes,
|
||||
options.fast_advertisement_service_uuid)) {
|
||||
NEARBY_LOGS(INFO) << "P2pClusterPcpHandler::StartBleAdvertising: failed to "
|
||||
"start advertising, advertisement_bytes=%p"
|
||||
<< advertisement_bytes.data();
|
||||
NEARBY_LOGS(ERROR)
|
||||
<< "P2pClusterPcpHandler::StartBleAdvertising: failed to "
|
||||
"start advertising, advertisement_bytes="
|
||||
<< absl::BytesToHexString(advertisement_bytes.data());
|
||||
ble_medium_.StopAcceptingConnections(service_id);
|
||||
return proto::connections::UNKNOWN_MEDIUM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user