mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2025-01-01 12:19:36 +00:00
fix
Signed-off-by: fengye <fengye10@huawei.com>
This commit is contained in:
parent
52e08da554
commit
036fe6a988
@ -39,7 +39,7 @@ int WifiDeviceCallBackStub::OnRemoteRequest(uint32_t code, IpcIo *data)
|
||||
|
||||
size_t length;
|
||||
uint16_t* interfaceRead = nullptr;
|
||||
interfaceRead = ReadInterfaceToken(req, &length);
|
||||
interfaceRead = ReadInterfaceToken(data, &length);
|
||||
for (size_t i = 0; i < length; i++) {
|
||||
if (i >= DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH || interfaceRead[i] != DECLARE_INTERFACE_DESCRIPTOR_L1[i]) {
|
||||
WIFI_LOGE("Sta stub token verification error: %{public}d", code);
|
||||
|
@ -307,7 +307,7 @@ ErrCode WifiDeviceProxy::EnableWifi()
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -338,7 +338,7 @@ ErrCode WifiDeviceProxy::DisableWifi()
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -369,7 +369,7 @@ ErrCode WifiDeviceProxy::InitWifiProtect(const WifiProtectType &protectType, con
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -402,7 +402,7 @@ ErrCode WifiDeviceProxy::GetWifiProtectRef(const WifiProtectMode &protectMode, c
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -435,7 +435,7 @@ ErrCode WifiDeviceProxy::PutWifiProtectRef(const std::string &protectName)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -531,7 +531,7 @@ ErrCode WifiDeviceProxy::AddDeviceConfig(const WifiDeviceConfig &config, int &re
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -565,7 +565,7 @@ ErrCode WifiDeviceProxy::UpdateDeviceConfig(const WifiDeviceConfig &config, int
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -598,7 +598,7 @@ ErrCode WifiDeviceProxy::RemoveDevice(int networkId)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -630,7 +630,7 @@ ErrCode WifiDeviceProxy::RemoveAllDevice()
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -661,7 +661,7 @@ ErrCode WifiDeviceProxy::GetDeviceConfigs(std::vector<WifiDeviceConfig> &result,
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -695,7 +695,7 @@ ErrCode WifiDeviceProxy::EnableDeviceConfig(int networkId, bool attemptEnable)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -728,7 +728,7 @@ ErrCode WifiDeviceProxy::DisableDeviceConfig(int networkId)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -760,7 +760,7 @@ ErrCode WifiDeviceProxy::ConnectToNetwork(int networkId, bool isCandidate)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -793,7 +793,7 @@ ErrCode WifiDeviceProxy::ConnectToDevice(const WifiDeviceConfig &config)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -824,7 +824,7 @@ ErrCode WifiDeviceProxy::IsConnected(bool &isConnected)
|
||||
char data[IPC_DATA_SIZE_SMALL];
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -856,7 +856,7 @@ ErrCode WifiDeviceProxy::ReConnect()
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -887,7 +887,7 @@ ErrCode WifiDeviceProxy::ReAssociate(void)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -918,7 +918,7 @@ ErrCode WifiDeviceProxy::Disconnect(void)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -949,7 +949,7 @@ ErrCode WifiDeviceProxy::StartWps(const WpsConfig &config)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -983,7 +983,7 @@ ErrCode WifiDeviceProxy::CancelWps(void)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1014,7 +1014,7 @@ ErrCode WifiDeviceProxy::IsWifiActive(bool &bActive)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1046,7 +1046,7 @@ ErrCode WifiDeviceProxy::GetWifiState(int &state)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1078,7 +1078,7 @@ ErrCode WifiDeviceProxy::GetLinkedInfo(WifiLinkedInfo &info)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1110,7 +1110,7 @@ ErrCode WifiDeviceProxy::GetIpInfo(IpInfo &info)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1142,7 +1142,7 @@ ErrCode WifiDeviceProxy::SetCountryCode(const std::string &countryCode)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1174,7 +1174,7 @@ ErrCode WifiDeviceProxy::GetCountryCode(std::string &countryCode)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1214,7 +1214,7 @@ ErrCode WifiDeviceProxy::RegisterCallBack(const std::shared_ptr<IWifiDeviceCallB
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1252,7 +1252,7 @@ ErrCode WifiDeviceProxy::GetSignalLevel(const int &rssi, const int &band, int &l
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1286,7 +1286,7 @@ ErrCode WifiDeviceProxy::GetSupportedFeatures(long &features)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1318,7 +1318,7 @@ ErrCode WifiDeviceProxy::GetDeviceMacAddress(std::string &result)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -1351,7 +1351,7 @@ bool WifiDeviceProxy::SetLowLatencyMode(bool enabled)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&req, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&req, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ int WifiScanCallbackStub::OnRemoteRequest(uint32_t code, IpcIo *data)
|
||||
|
||||
size_t length;
|
||||
uint16_t* interfaceRead = nullptr;
|
||||
interfaceRead = ReadInterfaceToken(req, &length);
|
||||
interfaceRead = ReadInterfaceToken(data, &length);
|
||||
for (size_t i = 0; i < length; i++) {
|
||||
if (i >= DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH || interfaceRead[i] != DECLARE_INTERFACE_DESCRIPTOR_L1[i]) {
|
||||
WIFI_LOGE("Scan stub token verification error: %{public}d", code);
|
||||
|
@ -208,7 +208,7 @@ ErrCode WifiScanProxy::SetScanControlInfo(const ScanControlInfo &info)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&request, data, IPC_DATA_SIZE_BIG, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -257,7 +257,7 @@ ErrCode WifiScanProxy::Scan()
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -289,7 +289,7 @@ ErrCode WifiScanProxy::AdvanceScan(const WifiScanParams ¶ms)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&request, data, IPC_DATA_SIZE_MID, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -329,7 +329,7 @@ ErrCode WifiScanProxy::IsWifiClosedScan(bool &bOpen)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -361,7 +361,7 @@ ErrCode WifiScanProxy::GetScanInfoList(std::vector<WifiScanInfo> &result)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -401,7 +401,7 @@ ErrCode WifiScanProxy::RegisterCallBack(const std::shared_ptr<IWifiScanCallback>
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
@ -435,7 +435,7 @@ ErrCode WifiScanProxy::GetSupportedFeatures(long &features)
|
||||
struct IpcOwner owner = {.exception = -1, .retCode = 0, .variable = nullptr};
|
||||
|
||||
IpcIoInit(&request, data, IPC_DATA_SIZE_SMALL, MAX_IPC_OBJ_COUNT);
|
||||
if (!WriteInterfaceToken(&data, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
if (!WriteInterfaceToken(&request, DECLARE_INTERFACE_DESCRIPTOR_L1, DECLARE_INTERFACE_DESCRIPTOR_L1_LENGTH)) {
|
||||
WIFI_LOGE("Write interface token error: %{public}s", __func__);
|
||||
return WIFI_OPT_FAILED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user