Skip to content

Commit c493340

Browse files
Log the discriminator when BLE NewConnection is called. (#38002)
1 parent cde93c0 commit c493340

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/platform/Darwin/BleConnectionDelegateImpl.mm

+5-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ - (void)removePeripheralsFromCache;
101101
// Make a copy of the device discriminator for the block to capture.
102102
SetupDiscriminator deviceDiscriminator = inDeviceDiscriminator;
103103

104-
ChipLogProgress(Ble, "ConnectionDelegate NewConnection with discriminator");
104+
if (inDeviceDiscriminator.IsShortDiscriminator()) {
105+
ChipLogProgress(Ble, "ConnectionDelegate NewConnection with short discriminator %d (0x%x)", inDeviceDiscriminator.GetShortValue(), inDeviceDiscriminator.GetShortValue());
106+
} else {
107+
ChipLogProgress(Ble, "ConnectionDelegate NewConnection with long discriminator %d (0x%x)", inDeviceDiscriminator.GetLongValue(), inDeviceDiscriminator.GetLongValue());
108+
}
105109
// If the previous connection delegate was not a try to connect to something, just reuse it instead of
106110
// creating a brand new connection but update the discriminator and the ble layer members.
107111
if (ble and ![ble isConnecting]) {

0 commit comments

Comments
 (0)