!7991 fix: change the judgement logic in stopping broadcast

Merge pull request !7991 from 咚咚/OpenHarmony-5.0.0-Release
This commit is contained in:
openharmony_ci 2024-10-28 13:04:47 +00:00 committed by Gitee
commit b5fe3838dd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1460,8 +1460,8 @@ int32_t StopBroadcasting(int32_t bcId)
int32_t ret = SoftBusMutexLock(&g_bcLock);
DISC_CHECK_AND_RETURN_RET_LOGE(ret == SOFTBUS_OK, SOFTBUS_LOCK_ERR, DISC_BROADCAST, "mutex error");
if (!g_bcManager[bcId].isAdvertising) {
DISC_LOGW(DISC_BROADCAST, "bcId is not advertising, bcId=%{public}d", bcId);
if (!g_bcManager[bcId].isStarted) {
DISC_LOGW(DISC_BROADCAST, "bcId is not start, bcId=%{public}d", bcId);
SoftBusMutexUnlock(&g_bcLock);
return SOFTBUS_OK;
}