!7377 br冲突重试的时间赋值过程中 if条件中(指针不为空)给变量赋值,指针是不为空的

Merge pull request !7377 from 霍宝宝/master
This commit is contained in:
openharmony_ci 2024-08-23 12:46:59 +00:00 committed by Gitee
commit 828a919f48
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -705,11 +705,11 @@ static int32_t AuthenticationFailedAndRetry(ConnBrConnection *connection, ConnBr
break;
}
}
uint32_t time = it->result == CONN_BR_CONNECT_UNDERLAYER_ERROR_CONN_RFCOM_DM ?
BR_CONNECTION_ACL_RETRY_CONNECT_COLLISION_MILLIS : BR_CONNECTION_ACL_CONNECT_COLLISION_MILLIS;
if (collision && connection->retryCount < MAX_RETRY_COUNT) {
CONN_LOGW(CONN_BR, "acl collision, wait for retry, id=%{public}u, addr=%{public}s, result=%{public}d",
connection->connectionId, anomizeAddress, it->result);
uint32_t time = it->result == CONN_BR_CONNECT_UNDERLAYER_ERROR_CONN_RFCOM_DM ?
BR_CONNECTION_ACL_RETRY_CONNECT_COLLISION_MILLIS : BR_CONNECTION_ACL_CONNECT_COLLISION_MILLIS;
// NOTICE: assign connecting NULL first to prevent recursively pending in connecting
g_brManager.connecting = NULL;
ProcessAclCollisionException(connectingDevice, anomizeAddress, time);