mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-23 16:59:54 +00:00
bug:add auth error code and modify judgement condition
Signed-off-by: song-chenxi050 <songchenxi2@huawei.com>
This commit is contained in:
parent
16646b0180
commit
81f254c3b6
@ -1244,7 +1244,7 @@ int32_t TransAuthGetConnIdByChanId(int32_t channelId, int32_t *connId)
|
||||
|
||||
int32_t CheckIsWifiAuthChannel(ConnectOption *connInfo)
|
||||
{
|
||||
if (connInfo == NULL || connInfo->socketOption.moduleId == AUTH) {
|
||||
if (connInfo == NULL || connInfo->socketOption.moduleId != AUTH) {
|
||||
TRANS_LOGE(
|
||||
TRANS_SVC, "invalid param, moduleId=%{public}d", connInfo == NULL ? -1 : connInfo->socketOption.moduleId);
|
||||
return SOFTBUS_INVALID_PARAM;
|
||||
|
@ -962,12 +962,12 @@ int32_t CheckIsProxyAuthChannel(ConnectOption *connInfo)
|
||||
sizeof(connInfo->bleOption.bleMac)) == 0 ||
|
||||
memcmp(item->connInfo.bleOption.deviceIdHash, connInfo->bleOption.deviceIdHash,
|
||||
SHORT_UDID_HASH_LEN) == 0) {
|
||||
TRANS_LOGE(TRANS_CTRL, "auth channel type is ble");
|
||||
TRANS_LOGI(TRANS_CTRL, "auth channel type is ble");
|
||||
(void)SoftBusMutexUnlock(&g_proxyConnectionList->lock);
|
||||
return SOFTBUS_OK;
|
||||
} else if (memcmp(item->connInfo.brOption.brMac, connInfo->brOption.brMac,
|
||||
sizeof(connInfo->brOption.brMac)) == 0) {
|
||||
TRANS_LOGE(TRANS_CTRL, "auth channel type is br");
|
||||
TRANS_LOGI(TRANS_CTRL, "auth channel type is br");
|
||||
(void)SoftBusMutexUnlock(&g_proxyConnectionList->lock);
|
||||
return SOFTBUS_OK;
|
||||
}
|
||||
|
@ -467,6 +467,8 @@ enum SoftBusErrNo {
|
||||
SOFTBUS_CHANNEL_AUTH_START_TIMEOUT,
|
||||
SOFTBUS_CHANNEL_AUTH_HANDLE_DATA_FAIL,
|
||||
SOFTBUS_CHANNEL_AUTH_PACK_DATA_FAIL,
|
||||
SOFTBUS_CHANNEL_AUTH_UNPACK_DATA_FAIL,
|
||||
SOFTBUS_CHANNEL_AUTH_GET_INSTANCE_FAIL,
|
||||
|
||||
/* errno begin: -((203 << 21) | (4 << 16) | 0xFFFF) */
|
||||
SOFTBUS_NETWORK_ERR_BASE = SOFTBUS_ERRNO(LNN_SUB_MODULE_CODE),
|
||||
|
Loading…
Reference in New Issue
Block a user