mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-12-03 15:12:24 +00:00
commit
e2afd7358a
@ -242,11 +242,17 @@ int AuthNegotiateChannel::OpenConnection(const OpenParam ¶m, const std::shar
|
||||
};
|
||||
|
||||
auto requestId = AuthGenRequestId();
|
||||
ret = AuthOpenConn(&authConnInfo, requestId, &authConnCallback, isMeta);
|
||||
CONN_CHECK_AND_RETURN_RET_LOGW(ret == SOFTBUS_OK, SOFTBUS_ERR, CONN_WIFI_DIRECT, "auth open connect failed");
|
||||
{
|
||||
std::lock_guard lock(lock_);
|
||||
requestIdToDeviceIdMap_[requestId] = param.remoteUuid;
|
||||
}
|
||||
|
||||
std::lock_guard lock(lock_);
|
||||
requestIdToDeviceIdMap_[requestId] = param.remoteUuid;
|
||||
return SOFTBUS_OK;
|
||||
ret = AuthOpenConn(&authConnInfo, requestId, &authConnCallback, isMeta);
|
||||
if (ret != SOFTBUS_OK) {
|
||||
CONN_LOGE(CONN_WIFI_DIRECT, "auth open connect failed, error=%{public}d", ret);
|
||||
std::lock_guard lock(lock_);
|
||||
requestIdToDeviceIdMap_.erase(requestId);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
} // namespace OHOS::SoftBus
|
||||
|
@ -89,6 +89,7 @@ public:
|
||||
std::lock_guard lock(executorLock_);
|
||||
auto it = executors_.find(remoteDeviceId);
|
||||
if (it == executors_.end()) {
|
||||
CONN_LOGI(CONN_WIFI_DIRECT, "executor not exist");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user