Skip to content

Commit b7c6120

Browse files
committed
fix(HCI): SetAdvertise only if enabled
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent ab1ea93 commit b7c6120

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utility/HCI.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,10 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
832832
ATT.removeConnection(disconnComplete->handle, disconnComplete->reason);
833833
L2CAPSignaling.removeConnection(disconnComplete->handle, disconnComplete->reason);
834834

835-
HCI.leSetAdvertiseEnable(0x01);
835+
if (GAP.advertising())
836+
{
837+
HCI.leSetAdvertiseEnable(0x01);
838+
}
836839
}
837840
else if (eventHdr->evt == EVT_ENCRYPTION_CHANGE)
838841
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy