mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-23 08:49:59 +00:00
commit
35967a6112
@ -239,6 +239,7 @@ static char *GetSrvType(BaseServiceType srvType)
|
||||
|
||||
static void BcStartBroadcastingCallback(int32_t adapterBcId, int32_t status)
|
||||
{
|
||||
static uint32_t callCount = 0;
|
||||
DISC_LOGI(DISC_BLE, "enter. adapterBcId=%{public}d", adapterBcId);
|
||||
for (uint32_t managerId = 0; managerId < BC_NUM_MAX; managerId++) {
|
||||
int32_t ret = SoftBusMutexLock(&g_bcLock);
|
||||
@ -250,8 +251,8 @@ static void BcStartBroadcastingCallback(int32_t adapterBcId, int32_t status)
|
||||
SoftBusMutexUnlock(&g_bcLock);
|
||||
continue;
|
||||
}
|
||||
DISC_LOGI(DISC_BLE, "srvType=%{public}s, managerId=%{public}u, adapterBcId=%{public}d, status=%{public}d",
|
||||
GetSrvType(bcManager->srvType), managerId, adapterBcId, status);
|
||||
DISC_LOGI(DISC_BLE, "srvType=%{public}s, managerId=%{public}u, adapterBcId=%{public}d, status=%{public}d,"
|
||||
"callCount=%{public}u", GetSrvType(bcManager->srvType), managerId, adapterBcId, status, callCount++);
|
||||
if (status == SOFTBUS_BC_STATUS_SUCCESS) {
|
||||
bcManager->isAdvertising = true;
|
||||
SoftBusCondSignal(&bcManager->cond);
|
||||
@ -1300,8 +1301,9 @@ int32_t StartBroadcasting(int32_t bcId, const BroadcastParam *param, const Broad
|
||||
}
|
||||
SoftbusBroadcastParam adapterParam;
|
||||
ConvertBcParams(param, &adapterParam);
|
||||
DISC_LOGI(DISC_BLE, "start service srvType=%{public}s, bcId=%{public}d, adapterId=%{public}d",
|
||||
GetSrvType(g_bcManager[bcId].srvType), bcId, g_bcManager[bcId].adapterBcId);
|
||||
DISC_LOGI(DISC_BLE, "start service srvType=%{public}s, bcId=%{public}d, adapterId=%{public}d,"
|
||||
"callCount=%{public}u", GetSrvType(g_bcManager[bcId].srvType), bcId,
|
||||
g_bcManager[bcId].adapterBcId, callCount++);
|
||||
SoftBusMutexUnlock(&g_bcLock);
|
||||
ret = g_interface[g_interfaceId]->StartBroadcasting(g_bcManager[bcId].adapterBcId, &adapterParam, &softbusBcData);
|
||||
g_bcManager[bcId].time = MgrGetSysTime();
|
||||
@ -1468,6 +1470,7 @@ static bool NeedUpdateScan(int32_t listenerId)
|
||||
|
||||
static int32_t StartScanSub(int32_t listenerId)
|
||||
{
|
||||
static uint32_t callCount = 0;
|
||||
SoftBusBcScanParams adapterParam;
|
||||
BuildSoftBusBcScanParams(&g_scanManager[listenerId].param, &adapterParam);
|
||||
|
||||
@ -1485,8 +1488,9 @@ static int32_t StartScanSub(int32_t listenerId)
|
||||
DISC_CHECK_AND_RETURN_RET_LOGE(filterSize > 0, SOFTBUS_BC_MGR_START_SCAN_NO_FILTER, DISC_BLE, "fitersize is 0!");
|
||||
DumpBcScanFilter(adapterFilter, filterSize);
|
||||
|
||||
DISC_LOGI(DISC_BLE, "start service srvType=%{public}s, listenerId=%{public}d, adapterId=%{public}d",
|
||||
GetSrvType(g_scanManager[listenerId].srvType), listenerId, g_scanManager[listenerId].adapterScanId);
|
||||
DISC_LOGI(DISC_BLE, "start service srvType=%{public}s, listenerId=%{public}d, adapterId=%{public}d,"
|
||||
"callCount=%{public}u", GetSrvType(g_scanManager[listenerId].srvType), listenerId,
|
||||
g_scanManager[listenerId].adapterScanId, callCount++);
|
||||
int32_t ret = g_interface[g_interfaceId]->StartScan(g_scanManager[listenerId].adapterScanId, &adapterParam,
|
||||
adapterFilter, filterSize);
|
||||
SoftBusFree(adapterFilter);
|
||||
|
@ -346,6 +346,7 @@ static int32_t ScanFilter(const BroadcastReportInfo *reportInfo)
|
||||
|
||||
static void ProcessDisConPacket(const BroadcastReportInfo *reportInfo, DeviceInfo *foundInfo)
|
||||
{
|
||||
static uint32_t callCount = 0;
|
||||
DeviceWrapper device = {
|
||||
.info = foundInfo,
|
||||
.power = SOFTBUS_ILLEGAL_BLE_POWER
|
||||
@ -359,7 +360,7 @@ static void ProcessDisConPacket(const BroadcastReportInfo *reportInfo, DeviceInf
|
||||
return;
|
||||
}
|
||||
if ((foundInfo->capabilityBitmap[0] & g_bleInfoManager[BLE_PUBLISH | BLE_PASSIVE].capBitMap[0]) == 0x0) {
|
||||
DISC_LOGI(DISC_BLE, "don't match passive publish capBitMap");
|
||||
DISC_LOGI(DISC_BLE, "don't match passive publish capBitMap, callCount=%{public}u", callCount++);
|
||||
(void)SoftBusMutexUnlock(&g_bleInfoLock);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user