!3230 CFI告警处理

Merge pull request !3230 from 王静/master
This commit is contained in:
openharmony_ci 2022-11-30 11:28:35 +00:00 committed by Gitee
commit f9d65f0142
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
54 changed files with 278 additions and 254 deletions

View File

@ -37,6 +37,7 @@
#include "softbus_adapter_mem.h"
#include "softbus_adapter_socket.h"
#include "softbus_adapter_thread.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
@ -142,15 +143,13 @@ static void ProcessLinkEvent(struct nlmsghdr *nlh)
}
}
static void *NetlinkMonitorThread(void *para)
NO_SANITIZE("cfi") static void *NetlinkMonitorThread(void *para)
{
int32_t sockFd;
int32_t len;
struct nlmsghdr *nlh = NULL;
(void)para;
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_INFO, "netlink monitor thread start");
sockFd = CreateNetlinkSocket();
int32_t sockFd = CreateNetlinkSocket();
if (sockFd < 0) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "create netlink socket failed");
return NULL;
@ -162,7 +161,7 @@ static void *NetlinkMonitorThread(void *para)
}
while (true) {
(void)memset_s(buffer, DEFAULT_NETLINK_RECVBUF, 0, DEFAULT_NETLINK_RECVBUF);
len = SoftBusSocketRecv(sockFd, buffer, DEFAULT_NETLINK_RECVBUF, 0);
int32_t len = SoftBusSocketRecv(sockFd, buffer, DEFAULT_NETLINK_RECVBUF, 0);
if (len < 0 && len == SOFTBUS_ADAPTER_SOCKET_EINTR) {
continue;
}

View File

@ -83,7 +83,7 @@ NO_SANITIZE("cfi") int32_t LnnInitOhosAccount(void)
return LnnSetLocalByteInfo(BYTE_KEY_ACCOUNT_HASH, accountHash, SHA_256_HASH_LEN);
}
void LnnOnOhosAccountChanged(void)
NO_SANITIZE("cfi") void LnnOnOhosAccountChanged(void)
{
uint8_t accountHash[SHA_256_HASH_LEN] = {0};
uint8_t localAccountHash[SHA_256_HASH_LEN] = {0};

View File

@ -71,7 +71,7 @@ static char *GenDeviceLevelParam(const char *udid, const char *uid, bool isClien
return data;
}
static bool OnTransmit(int64_t authSeq, const uint8_t *data, uint32_t len)
NO_SANITIZE("cfi") static bool OnTransmit(int64_t authSeq, const uint8_t *data, uint32_t len)
{
SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO,
"hichain OnTransmit: authSeq=%" PRId64 ", len=%u.", authSeq, len);
@ -82,7 +82,7 @@ static bool OnTransmit(int64_t authSeq, const uint8_t *data, uint32_t len)
return true;
}
static void OnSessionKeyReturned(int64_t authSeq, const uint8_t *sessionKey, uint32_t sessionKeyLen)
NO_SANITIZE("cfi") static void OnSessionKeyReturned(int64_t authSeq, const uint8_t *sessionKey, uint32_t sessionKeyLen)
{
SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO,
"hichain OnSessionKeyReturned: authSeq=%" PRId64 ", len=%u.", authSeq, sessionKeyLen);
@ -93,7 +93,7 @@ static void OnSessionKeyReturned(int64_t authSeq, const uint8_t *sessionKey, uin
(void)AuthSessionSaveSessionKey(authSeq, sessionKey, sessionKeyLen);
}
static void OnFinish(int64_t authSeq, int operationCode, const char *returnData)
NO_SANITIZE("cfi") static void OnFinish(int64_t authSeq, int operationCode, const char *returnData)
{
(void)operationCode;
(void)returnData;
@ -102,7 +102,7 @@ static void OnFinish(int64_t authSeq, int operationCode, const char *returnData)
(void)AuthSessionHandleAuthResult(authSeq, SOFTBUS_OK);
}
static void OnError(int64_t authSeq, int operationCode, int errCode, const char *errorReturn)
NO_SANITIZE("cfi") static void OnError(int64_t authSeq, int operationCode, int errCode, const char *errorReturn)
{
(void)operationCode;
(void)errorReturn;
@ -111,7 +111,7 @@ static void OnError(int64_t authSeq, int operationCode, int errCode, const char
(void)AuthSessionHandleAuthResult(authSeq, SOFTBUS_AUTH_HICHAIN_AUTH_ERROR);
}
static char *OnRequest(int64_t authSeq, int operationCode, const char *reqParams)
NO_SANITIZE("cfi") static char *OnRequest(int64_t authSeq, int operationCode, const char *reqParams)
{
(void)reqParams;
SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO,
@ -189,7 +189,7 @@ static void OnGroupCreated(const char *groupInfo)
}
}
static void OnGroupDeleted(const char *groupInfo)
NO_SANITIZE("cfi") static void OnGroupDeleted(const char *groupInfo)
{
if (groupInfo == NULL) {
SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_ERROR, "invalid group info.");
@ -205,7 +205,7 @@ static void OnGroupDeleted(const char *groupInfo)
}
}
static void OnDeviceNotTrusted(const char *udid)
NO_SANITIZE("cfi") static void OnDeviceNotTrusted(const char *udid)
{
SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "hichain OnDeviceNotTrusted.");
if (udid == NULL) {

View File

@ -492,7 +492,7 @@ static void NotifyDeviceDisconnect(int64_t authId)
g_verifyListener.onDeviceDisconnect(authId);
}
static void OnDeviceNotTrusted(const char *peerUdid)
NO_SANITIZE("cfi") static void OnDeviceNotTrusted(const char *peerUdid)
{
RemoveNotPassedAuthManagerByUdid(peerUdid);
AuthSessionHandleDeviceNotTrusted(peerUdid);
@ -504,7 +504,7 @@ static void OnDeviceNotTrusted(const char *peerUdid)
g_verifyListener.onDeviceNotTrusted(peerUdid);
}
static void OnGroupCreated(const char *groupId, int32_t groupType)
NO_SANITIZE("cfi") static void OnGroupCreated(const char *groupId, int32_t groupType)
{
if (g_groupChangeListener.onGroupCreated != NULL) {
g_groupChangeListener.onGroupCreated(groupId, groupType);

View File

@ -269,7 +269,7 @@ static int32_t OnConnectEvent(ListenerModule module, int32_t events,
return SOFTBUS_OK;
}
static int32_t OnDataEvent(ListenerModule module, int32_t events, int32_t fd)
NO_SANITIZE("cfi") static int32_t OnDataEvent(ListenerModule module, int32_t events, int32_t fd)
{
(void)module;
if (events == SOFTBUS_SOCKET_OUT) {

View File

@ -217,7 +217,8 @@ NO_SANITIZE("cfi") int32_t LnnIpcServerJoin(const char *pkgName, void *addr, uin
return ret;
}
int32_t MetaNodeIpcServerJoin(const char *pkgName, void *addr, CustomData *customData, uint32_t addrTypeLen)
NO_SANITIZE("cfi") int32_t MetaNodeIpcServerJoin(const char *pkgName, void *addr, CustomData *customData,
uint32_t addrTypeLen)
{
ConnectionAddr *connAddr = reinterpret_cast<ConnectionAddr *>(addr);
@ -256,7 +257,7 @@ NO_SANITIZE("cfi") int32_t LnnIpcServerLeave(const char *pkgName, const char *ne
return ret;
}
int32_t MetaNodeIpcServerLeave(const char *pkgName, const char *networkId)
NO_SANITIZE("cfi") int32_t MetaNodeIpcServerLeave(const char *pkgName, const char *networkId)
{
if (pkgName == nullptr || networkId == nullptr) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "parameters are nullptr!\n");
@ -389,7 +390,8 @@ NO_SANITIZE("cfi") int32_t LnnIpcNotifyJoinResult(void *addr, uint32_t addrTypeL
return SOFTBUS_OK;
}
int32_t MetaNodeIpcNotifyJoinResult(void *addr, uint32_t addrTypeLen, const char *networkId, int32_t retCode)
NO_SANITIZE("cfi") int32_t MetaNodeIpcNotifyJoinResult(void *addr, uint32_t addrTypeLen, const char *networkId,
int32_t retCode)
{
if (addr == nullptr) {
return SOFTBUS_INVALID_PARAM;
@ -428,7 +430,7 @@ NO_SANITIZE("cfi") int32_t LnnIpcNotifyLeaveResult(const char *networkId, int32_
return SOFTBUS_OK;
}
int32_t MetaNodeIpcNotifyLeaveResult(const char *networkId, int32_t retCode)
NO_SANITIZE("cfi") int32_t MetaNodeIpcNotifyLeaveResult(const char *networkId, int32_t retCode)
{
if (networkId == nullptr) {
return SOFTBUS_INVALID_PARAM;

View File

@ -16,11 +16,11 @@
#include "bus_center_manager.h"
#include <securec.h>
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
int32_t LnnPublishService(const char *pkgName, const PublishInfo *info, bool isInnerRequest)
NO_SANITIZE("cfi") int32_t LnnPublishService(const char *pkgName, const PublishInfo *info, bool isInnerRequest)
{
int32_t ret;
if (!isInnerRequest) {
@ -37,7 +37,7 @@ int32_t LnnPublishService(const char *pkgName, const PublishInfo *info, bool isI
return SOFTBUS_OK;
}
int32_t LnnUnPublishService(const char *pkgName, int32_t publishId, bool isInnerRequest)
NO_SANITIZE("cfi") int32_t LnnUnPublishService(const char *pkgName, int32_t publishId, bool isInnerRequest)
{
if (!isInnerRequest) {
if (DiscUnPublishService(pkgName, publishId) != SOFTBUS_OK) {
@ -53,7 +53,8 @@ int32_t LnnUnPublishService(const char *pkgName, int32_t publishId, bool isInner
return SOFTBUS_OK;
}
int32_t LnnStartDiscDevice(const char *pkgName, const SubscribeInfo *info, const InnerCallback *cb, bool isInnerRequest)
NO_SANITIZE("cfi") int32_t LnnStartDiscDevice(const char *pkgName, const SubscribeInfo *info, const InnerCallback *cb,
bool isInnerRequest)
{
int32_t ret;
if (!isInnerRequest) {
@ -74,7 +75,7 @@ int32_t LnnStartDiscDevice(const char *pkgName, const SubscribeInfo *info, const
return SOFTBUS_OK;
}
int32_t LnnStopDiscDevice(const char *pkgName, int32_t subscribeId, bool isInnerRequest)
NO_SANITIZE("cfi") int32_t LnnStopDiscDevice(const char *pkgName, int32_t subscribeId, bool isInnerRequest)
{
if (!isInnerRequest) {
if (DiscStopDiscovery(pkgName, subscribeId) != SOFTBUS_OK) {

View File

@ -82,7 +82,7 @@ NO_SANITIZE("cfi") int32_t LnnInitDiscoveryManager(void)
return SOFTBUS_OK;
}
int32_t LnnStartPublish(void)
NO_SANITIZE("cfi") int32_t LnnStartPublish(void)
{
uint32_t i;
@ -99,7 +99,7 @@ int32_t LnnStartPublish(void)
return SOFTBUS_OK;
}
void LnnStopPublish(void)
NO_SANITIZE("cfi") void LnnStopPublish(void)
{
uint32_t i;
@ -114,7 +114,7 @@ void LnnStopPublish(void)
}
}
int32_t LnnStartDiscovery(void)
NO_SANITIZE("cfi") int32_t LnnStartDiscovery(void)
{
uint32_t i;
@ -131,7 +131,7 @@ int32_t LnnStartDiscovery(void)
return SOFTBUS_OK;
}
void LnnStopDiscovery(void)
NO_SANITIZE("cfi") void LnnStopDiscovery(void)
{
uint32_t i;

View File

@ -165,7 +165,7 @@ static void HbToRecoveryNetwork(void)
}
}
int32_t LnnStartHeartbeatFrameDelay(void)
NO_SANITIZE("cfi") int32_t LnnStartHeartbeatFrameDelay(void)
{
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_INFO, "heartbeat(HB) FSM start.");
if (LnnHbMediumMgrInit() != SOFTBUS_OK) {
@ -191,7 +191,7 @@ int32_t LnnSetHeartbeatMediumParam(const LnnHeartbeatMediumParam *param)
return LnnSetMediumParamBySpecificType(param);
}
int32_t LnnOfflineTimingByHeartbeat(const char *networkId, ConnectionAddrType addrType)
NO_SANITIZE("cfi") int32_t LnnOfflineTimingByHeartbeat(const char *networkId, ConnectionAddrType addrType)
{
if (networkId == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB offline timing get invalid param");
@ -211,7 +211,8 @@ int32_t LnnOfflineTimingByHeartbeat(const char *networkId, ConnectionAddrType ad
return SOFTBUS_OK;
}
int32_t LnnShiftLNNGear(const char *pkgName, const char *callerId, const char *targetNetworkId, const GearMode *mode)
NO_SANITIZE("cfi") int32_t LnnShiftLNNGear(const char *pkgName, const char *callerId, const char *targetNetworkId,
const GearMode *mode)
{
if (pkgName == NULL || mode == NULL || callerId == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB shift lnn gear get invalid param");
@ -235,7 +236,7 @@ int32_t LnnShiftLNNGear(const char *pkgName, const char *callerId, const char *t
return SOFTBUS_OK;
}
void LnnUpdateHeartbeatInfo(LnnHeartbeatUpdateInfoType type)
NO_SANITIZE("cfi") void LnnUpdateHeartbeatInfo(LnnHeartbeatUpdateInfoType type)
{
LnnUpdateSendInfoStrategy(type);
}

View File

@ -307,7 +307,7 @@ static void RemoveHbMsgByCustObj(LnnHeartbeatFsm *hbFsm, LnnHeartbeatEventType e
}
}
void LnnRemoveSendEndMsg(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, bool *isRemoved)
NO_SANITIZE("cfi") void LnnRemoveSendEndMsg(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, bool *isRemoved)
{
if (hbFsm == NULL || isRemoved == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB remove send end msg get invalid param");
@ -323,7 +323,7 @@ void LnnRemoveSendEndMsg(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, bool *is
msgPara.isRemoved = NULL;
}
void LnnRemoveCheckDevStatusMsg(LnnHeartbeatFsm *hbFsm, LnnCheckDevStatusMsgPara *msgPara)
NO_SANITIZE("cfi") void LnnRemoveCheckDevStatusMsg(LnnHeartbeatFsm *hbFsm, LnnCheckDevStatusMsgPara *msgPara)
{
if (hbFsm == NULL || msgPara == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB remove check msg get invalid param");
@ -332,7 +332,8 @@ void LnnRemoveCheckDevStatusMsg(LnnHeartbeatFsm *hbFsm, LnnCheckDevStatusMsgPara
RemoveHbMsgByCustObj(hbFsm, EVENT_HB_CHECK_DEV_STATUS, (void *)msgPara);
}
void LnnRemoveProcessSendOnceMsg(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType hbType, LnnHeartbeatStrategyType strategyType)
NO_SANITIZE("cfi") void LnnRemoveProcessSendOnceMsg(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType hbType,
LnnHeartbeatStrategyType strategyType)
{
if (hbFsm == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB remove process send once msg get invalid param");
@ -848,7 +849,7 @@ NO_SANITIZE("cfi") LnnHeartbeatFsm *LnnCreateHeartbeatFsm(void)
return hbFsm;
}
int32_t LnnStartHeartbeatFsm(LnnHeartbeatFsm *hbFsm)
NO_SANITIZE("cfi") int32_t LnnStartHeartbeatFsm(LnnHeartbeatFsm *hbFsm)
{
if (hbFsm == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB start fsm is null");
@ -862,7 +863,7 @@ int32_t LnnStartHeartbeatFsm(LnnHeartbeatFsm *hbFsm)
return SOFTBUS_OK;
}
int32_t LnnStopHeartbeatFsm(LnnHeartbeatFsm *hbFsm)
NO_SANITIZE("cfi") int32_t LnnStopHeartbeatFsm(LnnHeartbeatFsm *hbFsm)
{
if (hbFsm == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB stop fsm is null");
@ -875,7 +876,7 @@ int32_t LnnStopHeartbeatFsm(LnnHeartbeatFsm *hbFsm)
return LnnFsmDeinit(&hbFsm->fsm);
}
int32_t LnnPostNextSendOnceMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnProcessSendOnceMsgPara *para,
NO_SANITIZE("cfi") int32_t LnnPostNextSendOnceMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnProcessSendOnceMsgPara *para,
uint64_t delayMillis)
{
LnnProcessSendOnceMsgPara *dupPara = NULL;
@ -910,7 +911,8 @@ static int32_t CreateNewHbTypeObjMsg(LnnHeartbeatType srcType, LnnHeartbeatType
return SOFTBUS_OK;
}
int32_t LnnPostSendBeginMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, bool wakeupFlag, bool isRelay)
NO_SANITIZE("cfi") int32_t LnnPostSendBeginMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, bool wakeupFlag,
bool isRelay)
{
LnnHeartbeatCustSendData *custData = NULL;
@ -934,7 +936,7 @@ int32_t LnnPostSendBeginMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type
return SOFTBUS_OK;
}
int32_t LnnPostSendEndMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, uint64_t delayMillis)
NO_SANITIZE("cfi") int32_t LnnPostSendEndMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type, uint64_t delayMillis)
{
LnnHeartbeatType *newType = NULL;
@ -954,7 +956,7 @@ int32_t LnnPostSendEndMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type,
return SOFTBUS_OK;
}
int32_t LnnPostStartMsgToHbFsm(LnnHeartbeatFsm *hbFsm, uint64_t delayMillis)
NO_SANITIZE("cfi") int32_t LnnPostStartMsgToHbFsm(LnnHeartbeatFsm *hbFsm, uint64_t delayMillis)
{
if (hbFsm == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB post start msg get invalid param");
@ -963,7 +965,7 @@ int32_t LnnPostStartMsgToHbFsm(LnnHeartbeatFsm *hbFsm, uint64_t delayMillis)
return LnnFsmPostMessageDelay(&hbFsm->fsm, EVENT_HB_START_PROCESS, NULL, delayMillis);
}
int32_t LnnPostStopMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type)
NO_SANITIZE("cfi") int32_t LnnPostStopMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type)
{
LnnHeartbeatType *newType = NULL;
@ -983,7 +985,7 @@ int32_t LnnPostStopMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatType type)
return SOFTBUS_OK;
}
int32_t LnnPostTransStateMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatEventType evtType)
NO_SANITIZE("cfi") int32_t LnnPostTransStateMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatEventType evtType)
{
if (hbFsm == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB post trans state msg get invalid hbFsm");
@ -996,7 +998,7 @@ int32_t LnnPostTransStateMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatEventTyp
return LnnFsmPostMessage(&hbFsm->fsm, evtType, NULL);
}
int32_t LnnPostSetMediumParamMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnHeartbeatMediumParam *para)
NO_SANITIZE("cfi") int32_t LnnPostSetMediumParamMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnHeartbeatMediumParam *para)
{
LnnHeartbeatMediumParam *dupPara = NULL;
@ -1018,7 +1020,7 @@ int32_t LnnPostSetMediumParamMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnHeartbe
return SOFTBUS_OK;
}
int32_t LnnPostCheckDevStatusMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnCheckDevStatusMsgPara *para,
NO_SANITIZE("cfi") int32_t LnnPostCheckDevStatusMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnCheckDevStatusMsgPara *para,
uint64_t delayMillis)
{
LnnCheckDevStatusMsgPara *dupPara = NULL;
@ -1048,7 +1050,7 @@ int32_t LnnPostCheckDevStatusMsgToHbFsm(LnnHeartbeatFsm *hbFsm, const LnnCheckDe
return SOFTBUS_OK;
}
int32_t LnnPostUpdateSendInfoMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatUpdateInfoType type)
NO_SANITIZE("cfi") int32_t LnnPostUpdateSendInfoMsgToHbFsm(LnnHeartbeatFsm *hbFsm, LnnHeartbeatUpdateInfoType type)
{
if (hbFsm == NULL || type <= UPDATE_HB_INFO_MIN || type >= UPDATE_HB_MAX_INFO) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB post update info msg get invalid param");

View File

@ -636,7 +636,7 @@ static bool VisitUnRegistHeartbeatMediumMgr(LnnHeartbeatType *typeSet, LnnHeartb
return true;
}
int32_t LnnUnRegistHeartbeatMediumMgr(LnnHeartbeatMediumMgr *mgr)
NO_SANITIZE("cfi") int32_t LnnUnRegistHeartbeatMediumMgr(LnnHeartbeatMediumMgr *mgr)
{
if (mgr == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB unregist manager get invalid param");

View File

@ -220,7 +220,8 @@ static int32_t FirstSetGearModeByCallerId(const char *callerId, int64_t nowTime,
return SOFTBUS_OK;
}
int32_t LnnSetGearModeBySpecificType(const char *callerId, const GearMode *mode, LnnHeartbeatType type)
NO_SANITIZE("cfi") int32_t LnnSetGearModeBySpecificType(const char *callerId, const GearMode *mode,
LnnHeartbeatType type)
{
int64_t nowTime;
SoftBusSysTime times;
@ -433,7 +434,7 @@ static bool VisitRegistParamMgr(LnnHeartbeatType *typeSet, LnnHeartbeatType each
return true;
}
int32_t LnnRegistParamMgrByType(LnnHeartbeatType type)
NO_SANITIZE("cfi") int32_t LnnRegistParamMgrByType(LnnHeartbeatType type)
{
if (SoftBusMutexLock(&g_hbStrategyMutex) != 0) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB regist paramMgr lock mutex fail");
@ -479,7 +480,7 @@ static bool VisitUnRegistParamMgr(LnnHeartbeatType *typeSet, LnnHeartbeatType ea
return true;
}
void LnnUnRegistParamMgrByType(LnnHeartbeatType type)
NO_SANITIZE("cfi") void LnnUnRegistParamMgrByType(LnnHeartbeatType type)
{
if (SoftBusMutexLock(&g_hbStrategyMutex) != 0) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB unRegist paramMgr lock mutex fail");
@ -489,7 +490,7 @@ void LnnUnRegistParamMgrByType(LnnHeartbeatType type)
(void)SoftBusMutexUnlock(&g_hbStrategyMutex);
}
int32_t LnnSetMediumParamBySpecificType(const LnnHeartbeatMediumParam *param)
NO_SANITIZE("cfi") int32_t LnnSetMediumParamBySpecificType(const LnnHeartbeatMediumParam *param)
{
LnnHeartbeatParamManager *paramMgr = NULL;
@ -580,7 +581,7 @@ NO_SANITIZE("cfi") int32_t LnnGetHbStrategyManager(LnnHeartbeatStrategyManager *
return SOFTBUS_OK;
}
int32_t LnnStartNewHbStrategyFsm(void)
NO_SANITIZE("cfi") int32_t LnnStartNewHbStrategyFsm(void)
{
LnnHeartbeatFsm *hbFsm = NULL;
@ -601,7 +602,7 @@ int32_t LnnStartNewHbStrategyFsm(void)
return SOFTBUS_OK;
}
int32_t LnnStartOfflineTimingStrategy(const char *networkId, ConnectionAddrType addrType)
NO_SANITIZE("cfi") int32_t LnnStartOfflineTimingStrategy(const char *networkId, ConnectionAddrType addrType)
{
GearMode mode = {0};
LnnCheckDevStatusMsgPara msgPara = {0};
@ -623,7 +624,7 @@ int32_t LnnStartOfflineTimingStrategy(const char *networkId, ConnectionAddrType
return LnnPostCheckDevStatusMsgToHbFsm(g_hbFsm, &msgPara, delayMillis);
}
int32_t LnnStopOfflineTimingStrategy(const char *networkId, ConnectionAddrType addrType)
NO_SANITIZE("cfi") int32_t LnnStopOfflineTimingStrategy(const char *networkId, ConnectionAddrType addrType)
{
if (networkId == NULL) {
return SOFTBUS_INVALID_PARAM;
@ -641,7 +642,8 @@ int32_t LnnStopOfflineTimingStrategy(const char *networkId, ConnectionAddrType a
return SOFTBUS_OK;
}
int32_t LnnStartHbByTypeAndStrategy(LnnHeartbeatType hbType, LnnHeartbeatStrategyType strategyType, bool isRelay)
NO_SANITIZE("cfi") int32_t LnnStartHbByTypeAndStrategy(LnnHeartbeatType hbType, LnnHeartbeatStrategyType strategyType,
bool isRelay)
{
LnnProcessSendOnceMsgPara msgPara = {
.hbType = hbType,
@ -661,7 +663,7 @@ int32_t LnnStartHeartbeat(uint64_t delayMillis)
return LnnPostStartMsgToHbFsm(g_hbFsm, delayMillis);
}
int32_t LnnStopHeartbeatByType(LnnHeartbeatType type)
NO_SANITIZE("cfi") int32_t LnnStopHeartbeatByType(LnnHeartbeatType type)
{
if (LnnPostStopMsgToHbFsm(g_hbFsm, type) != SOFTBUS_OK) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "HB stop heartbeat by type post msg fail");
@ -714,12 +716,12 @@ NO_SANITIZE("cfi") bool LnnIsHeartbeatEnable(LnnHeartbeatType type)
return ret;
}
int32_t LnnSetHbAsMasterNodeState(bool isMasterNode)
NO_SANITIZE("cfi") int32_t LnnSetHbAsMasterNodeState(bool isMasterNode)
{
return LnnPostTransStateMsgToHbFsm(g_hbFsm, isMasterNode ? EVENT_HB_AS_MASTER_NODE : EVENT_HB_AS_NORMAL_NODE);
}
int32_t LnnUpdateSendInfoStrategy(LnnHeartbeatUpdateInfoType type)
NO_SANITIZE("cfi") int32_t LnnUpdateSendInfoStrategy(LnnHeartbeatUpdateInfoType type)
{
return LnnPostUpdateSendInfoMsgToHbFsm(g_hbFsm, type);
}

View File

@ -163,7 +163,7 @@ NO_SANITIZE("cfi") bool LnnHasActiveConnection(const char *networkId, Connection
return false;
}
bool LnnVisitHbTypeSet(VisitHbTypeCb callback, LnnHeartbeatType *typeSet, void *data)
NO_SANITIZE("cfi") bool LnnVisitHbTypeSet(VisitHbTypeCb callback, LnnHeartbeatType *typeSet, void *data)
{
bool isFinish = false;
LnnHeartbeatType i;

View File

@ -311,7 +311,7 @@ NO_SANITIZE("cfi") int32_t LnnFreeLane(uint32_t laneId)
return SOFTBUS_OK;
}
QueryResult LnnQueryLaneResource(const LaneQueryInfo *queryInfo)
NO_SANITIZE("cfi") QueryResult LnnQueryLaneResource(const LaneQueryInfo *queryInfo)
{
if (queryInfo == NULL) {
return QUERY_RESULT_REQUEST_ILLEGAL;

View File

@ -130,7 +130,7 @@ NO_SANITIZE("cfi") int32_t LnnCreateData(Map *map, uint32_t key, const void *val
return SOFTBUS_OK;
}
void *LnnReadData(const Map *map, uint32_t key)
NO_SANITIZE("cfi") void *LnnReadData(const Map *map, uint32_t key)
{
char keyStr[UINT_TO_STR_MAX_LEN] = {0};
if (sprintf_s(keyStr, UINT_TO_STR_MAX_LEN, "%u", key) < 0) {

View File

@ -137,7 +137,7 @@ static int64_t GetAuthIdFromItem(int32_t requestId)
return authId;
}
int32_t LnnLanePendingInit(void)
NO_SANITIZE("cfi") int32_t LnnLanePendingInit(void)
{
if (g_pendingList != NULL) {
return SOFTBUS_OK;
@ -149,7 +149,7 @@ int32_t LnnLanePendingInit(void)
return SOFTBUS_OK;
}
void LnnLanePendingDeinit(void)
NO_SANITIZE("cfi") void LnnLanePendingDeinit(void)
{
if (g_pendingList == NULL) {
return;

View File

@ -27,10 +27,10 @@
#include "lnn_lane_select.h"
#include "message_handler.h"
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_utils.h"
#include "softbus_def.h"
typedef enum {
MSG_TYPE_LANE_TRIGGER_LINK = 0,
@ -499,7 +499,7 @@ static void LaneLinkException(SoftBusMessage *msg)
NotifyLaneStateChange(laneId, state);
}
static void MsgHandler(SoftBusMessage *msg)
NO_SANITIZE("cfi") static void MsgHandler(SoftBusMessage *msg)
{
if (msg == NULL) {
return;

View File

@ -487,7 +487,7 @@ NO_SANITIZE("cfi") void LnnDeinitTimeSync(void)
LnnTimeSyncImplDeinit();
}
int32_t LnnStartTimeSync(const char *pkgName, const char *targetNetworkId,
NO_SANITIZE("cfi") int32_t LnnStartTimeSync(const char *pkgName, const char *targetNetworkId,
TimeSyncAccuracy accuracy, TimeSyncPeriod period)
{
StartTimeSyncReqMsgPara *para = NULL;
@ -526,7 +526,7 @@ int32_t LnnStartTimeSync(const char *pkgName, const char *targetNetworkId,
return SOFTBUS_OK;
}
int32_t LnnStopTimeSync(const char *pkgName, const char *targetNetworkId)
NO_SANITIZE("cfi") int32_t LnnStopTimeSync(const char *pkgName, const char *targetNetworkId)
{
StopTimeSyncReqMsgPara *para = NULL;

View File

@ -181,7 +181,7 @@ static void ReportResult(const char *udid, ReportCategory report)
}
}
int64_t LnnUpTimeMs(void)
NO_SANITIZE("cfi") int64_t LnnUpTimeMs(void)
{
SoftBusSysTime t;
t.sec = 0;
@ -360,7 +360,7 @@ static int32_t OnJoinLNN(LnnConnectionFsm *connFsm)
return rc;
}
int32_t OnJoinMetaNode(MetaJoinRequestNode *metaJoinNode, CustomData *customData)
NO_SANITIZE("cfi") int32_t OnJoinMetaNode(MetaJoinRequestNode *metaJoinNode, CustomData *customData)
{
if (metaJoinNode == NULL || customData == NULL) {
return SOFTBUS_ERR;
@ -809,7 +809,7 @@ NO_SANITIZE("cfi") void LnnDestroyConnectionFsm(LnnConnectionFsm *connFsm)
SoftBusFree(connFsm);
}
int32_t LnnStartConnectionFsm(LnnConnectionFsm *connFsm)
NO_SANITIZE("cfi") int32_t LnnStartConnectionFsm(LnnConnectionFsm *connFsm)
{
if (connFsm == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "connection fsm is null");
@ -823,7 +823,7 @@ int32_t LnnStartConnectionFsm(LnnConnectionFsm *connFsm)
return SOFTBUS_OK;
}
int32_t LnnStopConnectionFsm(LnnConnectionFsm *connFsm, LnnConnectionFsmStopCallback callback)
NO_SANITIZE("cfi") int32_t LnnStopConnectionFsm(LnnConnectionFsm *connFsm, LnnConnectionFsmStopCallback callback)
{
if (connFsm == NULL || callback == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "connection fsm or stop callback is null");
@ -837,7 +837,7 @@ int32_t LnnStopConnectionFsm(LnnConnectionFsm *connFsm, LnnConnectionFsmStopCall
return LnnFsmDeinit(&connFsm->fsm);
}
int32_t LnnSendJoinRequestToConnFsm(LnnConnectionFsm *connFsm)
NO_SANITIZE("cfi") int32_t LnnSendJoinRequestToConnFsm(LnnConnectionFsm *connFsm)
{
if (!CheckInterfaceCommonArgs(connFsm, true)) {
return SOFTBUS_INVALID_PARAM;
@ -846,7 +846,7 @@ int32_t LnnSendJoinRequestToConnFsm(LnnConnectionFsm *connFsm)
return LnnFsmPostMessage(&connFsm->fsm, FSM_MSG_TYPE_JOIN_LNN, NULL);
}
int32_t LnnSendAuthResultMsgToConnFsm(LnnConnectionFsm *connFsm, int32_t retCode)
NO_SANITIZE("cfi") int32_t LnnSendAuthResultMsgToConnFsm(LnnConnectionFsm *connFsm, int32_t retCode)
{
int32_t *para = NULL;
@ -867,7 +867,7 @@ int32_t LnnSendAuthResultMsgToConnFsm(LnnConnectionFsm *connFsm, int32_t retCode
return SOFTBUS_OK;
}
int32_t LnnSendNotTrustedToConnFsm(LnnConnectionFsm *connFsm)
NO_SANITIZE("cfi") int32_t LnnSendNotTrustedToConnFsm(LnnConnectionFsm *connFsm)
{
if (!CheckInterfaceCommonArgs(connFsm, true)) {
return SOFTBUS_INVALID_PARAM;
@ -875,7 +875,7 @@ int32_t LnnSendNotTrustedToConnFsm(LnnConnectionFsm *connFsm)
return LnnFsmPostMessage(&connFsm->fsm, FSM_MSG_TYPE_NOT_TRUSTED, NULL);
}
int32_t LnnSendDisconnectMsgToConnFsm(LnnConnectionFsm *connFsm)
NO_SANITIZE("cfi") int32_t LnnSendDisconnectMsgToConnFsm(LnnConnectionFsm *connFsm)
{
if (!CheckInterfaceCommonArgs(connFsm, true)) {
return SOFTBUS_INVALID_PARAM;
@ -883,7 +883,7 @@ int32_t LnnSendDisconnectMsgToConnFsm(LnnConnectionFsm *connFsm)
return LnnFsmPostMessage(&connFsm->fsm, FSM_MSG_TYPE_DISCONNECT, NULL);
}
int32_t LnnSendLeaveRequestToConnFsm(LnnConnectionFsm *connFsm)
NO_SANITIZE("cfi") int32_t LnnSendLeaveRequestToConnFsm(LnnConnectionFsm *connFsm)
{
if (!CheckInterfaceCommonArgs(connFsm, true)) {
return SOFTBUS_ERR;
@ -891,7 +891,7 @@ int32_t LnnSendLeaveRequestToConnFsm(LnnConnectionFsm *connFsm)
return LnnFsmPostMessage(&connFsm->fsm, FSM_MSG_TYPE_LEAVE_LNN, NULL);
}
int32_t LnnSendSyncOfflineFinishToConnFsm(LnnConnectionFsm *connFsm)
NO_SANITIZE("cfi") int32_t LnnSendSyncOfflineFinishToConnFsm(LnnConnectionFsm *connFsm)
{
if (!CheckInterfaceCommonArgs(connFsm, true)) {
return SOFTBUS_ERR;
@ -899,7 +899,7 @@ int32_t LnnSendSyncOfflineFinishToConnFsm(LnnConnectionFsm *connFsm)
return LnnFsmPostMessage(&connFsm->fsm, FSM_MSG_TYPE_SYNC_OFFLINE_DONE, NULL);
}
int32_t LnnSendNewNetworkOnlineToConnFsm(LnnConnectionFsm *connFsm)
NO_SANITIZE("cfi") int32_t LnnSendNewNetworkOnlineToConnFsm(LnnConnectionFsm *connFsm)
{
if (!CheckInterfaceCommonArgs(connFsm, true)) {
return SOFTBUS_ERR;

View File

@ -29,11 +29,11 @@
#include "lnn_sync_item_info.h"
#include "lnn_settingdata_event_monitor.h"
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_wifi_api_adapter.h"
#include "softbus_json_utils.h"
#include "message_handler.h"
#include "softbus_def.h"
#define DELAY_LEN 1000
#define MAX_TRY 10

View File

@ -1390,7 +1390,7 @@ static NetBuilderMessageProcess g_messageProcessor[MSG_TYPE_MAX] = {
ProcessOnAuthMetaVerifyFailed,
};
static void NetBuilderMessageHandler(SoftBusMessage *msg)
NO_SANITIZE("cfi") static void NetBuilderMessageHandler(SoftBusMessage *msg)
{
int32_t ret;
@ -1795,7 +1795,7 @@ static void OnReceiveNodeAddrChangedMsg(LnnSyncInfoType type, const char *networ
}
}
int32_t LnnUpdateNodeAddr(const char *addr)
NO_SANITIZE("cfi") int32_t LnnUpdateNodeAddr(const char *addr)
{
if (addr == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "%s:null ptr!", __func__);
@ -1846,7 +1846,7 @@ int32_t LnnUpdateNodeAddr(const char *addr)
return SOFTBUS_OK;
}
int32_t NodeInfoSync(void)
NO_SANITIZE("cfi") int32_t NodeInfoSync(void)
{
if (LnnInitP2p() != SOFTBUS_OK) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "init lnn p2p fail");
@ -1946,7 +1946,7 @@ NO_SANITIZE("cfi") void LnnDeinitNetBuilder(void)
g_netBuilder.isInit = false;
}
int32_t LnnServerJoin(ConnectionAddr *addr)
NO_SANITIZE("cfi") int32_t LnnServerJoin(ConnectionAddr *addr)
{
ConnectionAddr *para = NULL;
@ -1968,7 +1968,7 @@ int32_t LnnServerJoin(ConnectionAddr *addr)
return SOFTBUS_OK;
}
int32_t MetaNodeServerJoin(ConnectionAddr *addr, CustomData *customData)
NO_SANITIZE("cfi") int32_t MetaNodeServerJoin(ConnectionAddr *addr, CustomData *customData)
{
ConnectionAddrKey addrDataKey = {
.addr = *addr,
@ -1993,7 +1993,7 @@ int32_t MetaNodeServerJoin(ConnectionAddr *addr, CustomData *customData)
return SOFTBUS_OK;
}
int32_t LnnServerLeave(const char *networkId)
NO_SANITIZE("cfi") int32_t LnnServerLeave(const char *networkId)
{
char *para = NULL;
@ -2015,7 +2015,7 @@ int32_t LnnServerLeave(const char *networkId)
return SOFTBUS_OK;
}
int32_t MetaNodeServerLeave(const char *networkId)
NO_SANITIZE("cfi") int32_t MetaNodeServerLeave(const char *networkId)
{
char *para = NULL;
@ -2037,7 +2037,7 @@ int32_t MetaNodeServerLeave(const char *networkId)
return SOFTBUS_OK;
}
int32_t LnnNotifyDiscoveryDevice(const ConnectionAddr *addr)
NO_SANITIZE("cfi") int32_t LnnNotifyDiscoveryDevice(const ConnectionAddr *addr)
{
ConnectionAddr *para = NULL;
@ -2059,7 +2059,7 @@ int32_t LnnNotifyDiscoveryDevice(const ConnectionAddr *addr)
return SOFTBUS_OK;
}
int32_t LnnRequestLeaveInvalidConn(const char *oldNetworkId, ConnectionAddrType addrType,
NO_SANITIZE("cfi") int32_t LnnRequestLeaveInvalidConn(const char *oldNetworkId, ConnectionAddrType addrType,
const char *newNetworkId)
{
LeaveInvalidConnMsgPara *para = NULL;
@ -2088,7 +2088,7 @@ int32_t LnnRequestLeaveInvalidConn(const char *oldNetworkId, ConnectionAddrType
return SOFTBUS_OK;
}
int32_t LnnRequestCleanConnFsm(uint16_t connFsmId)
NO_SANITIZE("cfi") int32_t LnnRequestCleanConnFsm(uint16_t connFsmId)
{
uint16_t *para = NULL;
@ -2153,7 +2153,7 @@ int32_t LnnNotifyNodeStateChanged(const ConnectionAddr *addr)
return SOFTBUS_OK;
}
int32_t LnnNotifyMasterElect(const char *networkId, const char *masterUdid, int32_t masterWeight)
NO_SANITIZE("cfi") int32_t LnnNotifyMasterElect(const char *networkId, const char *masterUdid, int32_t masterWeight)
{
ElectMsgPara *para = NULL;
@ -2186,7 +2186,7 @@ int32_t LnnNotifyMasterElect(const char *networkId, const char *masterUdid, int3
}
/* Note: must called in connection fsm. */
int32_t LnnNotifyAuthHandleLeaveLNN(int64_t authId)
NO_SANITIZE("cfi") int32_t LnnNotifyAuthHandleLeaveLNN(int64_t authId)
{
LnnConnectionFsm *item = NULL;
@ -2209,7 +2209,7 @@ int32_t LnnNotifyAuthHandleLeaveLNN(int64_t authId)
return SOFTBUS_OK;
}
int32_t LnnRequestLeaveByAddrType(const bool *type, uint32_t typeLen)
NO_SANITIZE("cfi") int32_t LnnRequestLeaveByAddrType(const bool *type, uint32_t typeLen)
{
bool *para = NULL;
if (typeLen != CONNECTION_ADDR_MAX) {
@ -2239,7 +2239,7 @@ int32_t LnnRequestLeaveByAddrType(const bool *type, uint32_t typeLen)
return SOFTBUS_OK;
}
int32_t LnnRequestLeaveSpecific(const char *networkId, ConnectionAddrType addrType)
NO_SANITIZE("cfi") int32_t LnnRequestLeaveSpecific(const char *networkId, ConnectionAddrType addrType)
{
SpecificLeaveMsgPara *para = NULL;

View File

@ -147,7 +147,7 @@ static void OnReceiveP2pSyncInfoMsg(LnnSyncInfoType type, const char *networkId,
}
}
int32_t LnnSyncP2pInfo(void)
NO_SANITIZE("cfi") int32_t LnnSyncP2pInfo(void)
{
int32_t rc = LnnAsyncCallbackHelper(GetLooper(LOOP_TYPE_DEFAULT), ProcessSyncP2pInfo, NULL);
if (rc != SOFTBUS_OK) {

View File

@ -408,7 +408,7 @@ NO_SANITIZE("cfi") void LnnDeinitSyncInfoManager(void)
SoftBusMutexDestroy(&g_syncInfoManager.lock);
}
int32_t LnnRegSyncInfoHandler(LnnSyncInfoType type, LnnSyncInfoMsgHandler handler)
NO_SANITIZE("cfi") int32_t LnnRegSyncInfoHandler(LnnSyncInfoType type, LnnSyncInfoMsgHandler handler)
{
if (type >= LNN_INFO_TYPE_COUNT || handler == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "invalid sync info hander reg param: %d", type);
@ -428,7 +428,7 @@ int32_t LnnRegSyncInfoHandler(LnnSyncInfoType type, LnnSyncInfoMsgHandler handle
return SOFTBUS_OK;
}
int32_t LnnUnregSyncInfoHandler(LnnSyncInfoType type, LnnSyncInfoMsgHandler handler)
NO_SANITIZE("cfi") int32_t LnnUnregSyncInfoHandler(LnnSyncInfoType type, LnnSyncInfoMsgHandler handler)
{
if (type >= LNN_INFO_TYPE_COUNT || handler == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "invalid sync info hander unreg param: %d", type);
@ -516,7 +516,7 @@ static int32_t TrySendSyncInfoMsg(const char *networkId, SyncInfoMsg *msg)
return SOFTBUS_OK;
}
int32_t LnnSendSyncInfoMsg(LnnSyncInfoType type, const char *networkId,
NO_SANITIZE("cfi") int32_t LnnSendSyncInfoMsg(LnnSyncInfoType type, const char *networkId,
const uint8_t *msg, uint32_t len, LnnSyncInfoMsgComplete complete)
{
SyncInfoMsg *syncMsg = NULL;

View File

@ -21,6 +21,7 @@
#include "lnn_local_net_ledger.h"
#include "lnn_sync_info_manager.h"
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_wifi_api_adapter.h"
@ -143,7 +144,7 @@ void OnReceiveTransReqMsg(LnnSyncInfoType type, const char *networkId, const uin
}
}
int32_t LnnSyncDeviceName(const char *networkId)
NO_SANITIZE("cfi") int32_t LnnSyncDeviceName(const char *networkId)
{
const char *deviceName = NULL;
const NodeInfo *info = LnnGetLocalNodeInfo();

View File

@ -265,7 +265,7 @@ int32_t UnregistProtocol(LnnProtocolManager *protocolMgr)
return SOFTBUS_ERR;
}
bool LnnVisitNetif(VisitNetifCallback callback, void *data)
NO_SANITIZE("cfi") bool LnnVisitNetif(VisitNetifCallback callback, void *data)
{
LnnNetIfMgr *item = NULL;
VisitNextChoice result = CHOICE_VISIT_NEXT;
@ -279,7 +279,7 @@ bool LnnVisitNetif(VisitNetifCallback callback, void *data)
return true;
}
bool LnnVisitProtocol(VisitProtocolCallback callback, void *data)
NO_SANITIZE("cfi") bool LnnVisitProtocol(VisitProtocolCallback callback, void *data)
{
VisitNextChoice result = CHOICE_VISIT_NEXT;
for (uint8_t i = 0; i < LNN_NETWORK_MAX_PROTOCOL_COUNT; i++) {
@ -318,7 +318,7 @@ static void RestartCoapDiscovery(void)
SetCallLnnStatus(true);
}
static void OnGroupCreated(const char *groupId, int32_t groupType)
NO_SANITIZE("cfi") static void OnGroupCreated(const char *groupId, int32_t groupType)
{
(void)groupId;
RestartCoapDiscovery();
@ -328,7 +328,7 @@ static void OnGroupCreated(const char *groupId, int32_t groupType)
LnnHbOnAuthGroupCreated(groupType);
}
static void OnGroupDeleted(const char *groupId)
NO_SANITIZE("cfi") static void OnGroupDeleted(const char *groupId)
{
(void)groupId;
LnnOnOhosAccountChanged();

View File

@ -90,7 +90,7 @@ static int32_t DoRegistSubnet(LnnPhysicalSubnet *subnet)
return SOFTBUS_ERR;
}
int32_t LnnRegistPhysicalSubnet(LnnPhysicalSubnet *subnet)
NO_SANITIZE("cfi") int32_t LnnRegistPhysicalSubnet(LnnPhysicalSubnet *subnet)
{
if (subnet == NULL || subnet->protocol == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "%s: protocol of subnet is required!", __func__);
@ -114,7 +114,7 @@ static int32_t DoUnregistSubnetByType(ProtocolType type)
return SOFTBUS_OK;
}
int32_t LnnUnregistPhysicalSubnetByType(ProtocolType type)
NO_SANITIZE("cfi") int32_t LnnUnregistPhysicalSubnetByType(ProtocolType type)
{
int32_t ret = SOFTBUS_OK;
CALL_WITH_LOCK(ret, &g_physicalSubnetsLock, DoUnregistSubnetByType(type));
@ -156,7 +156,7 @@ static void EnableResetingSubnetByType(ProtocolType protocolType)
}
}
void LnnNotifyAllTypeOffline(ConnectionAddrType type)
NO_SANITIZE("cfi") void LnnNotifyAllTypeOffline(ConnectionAddrType type)
{
if (type == CONNECTION_ADDR_ETH || type == CONNECTION_ADDR_WLAN || type == CONNECTION_ADDR_MAX) {
CALL_VOID_FUNC_WITH_LOCK(&g_physicalSubnetsLock, EnableResetingSubnetByType(LNN_PROTOCOL_IP));
@ -178,7 +178,7 @@ static bool DoVisitSubnet(LnnVisitPhysicalSubnetCallback callback, void *data)
return true;
}
bool LnnVisitPhysicalSubnet(LnnVisitPhysicalSubnetCallback callback, void *data)
NO_SANITIZE("cfi") bool LnnVisitPhysicalSubnet(LnnVisitPhysicalSubnetCallback callback, void *data)
{
bool ret = false;
CALL_WITH_LOCK(ret, &g_physicalSubnetsLock, DoVisitSubnet(callback, data));

View File

@ -56,7 +56,7 @@ NO_SANITIZE("cfi") const char *LnnGetDeviceName(const DeviceBasicInfo *info)
return info->deviceName;
}
int32_t LnnSetDeviceName(DeviceBasicInfo *info, const char *name)
NO_SANITIZE("cfi") int32_t LnnSetDeviceName(DeviceBasicInfo *info, const char *name)
{
if (info == NULL || name == NULL || strlen(name) > DEVICE_NAME_BUF_LEN - 1) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "LnnSetDeviceName para error.");

View File

@ -24,7 +24,7 @@
/* support bit1:br, bit2:wifi, bit4:wifi 2.4G */
#define DEFAUTL_LNN_CAPBILITY 0x16
int32_t LnnSetNetCapability(uint32_t *capability, NetCapability type)
NO_SANITIZE("cfi") int32_t LnnSetNetCapability(uint32_t *capability, NetCapability type)
{
if (capability == NULL || type >= BIT_COUNT) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "in para error!");

View File

@ -158,7 +158,7 @@ int32_t LnnGetNodeKeyInfo(const char *networkId, int key, uint8_t *info, uint32_
}
}
int32_t LnnSetNodeDataChangeFlag(const char *networkId, uint16_t dataChangeFlag)
NO_SANITIZE("cfi") int32_t LnnSetNodeDataChangeFlag(const char *networkId, uint16_t dataChangeFlag)
{
bool isLocalNetworkId = false;
char localNetworkId[NETWORK_ID_BUF_LEN] = {0};

View File

@ -43,7 +43,7 @@ NO_SANITIZE("cfi") const char *LnnGetDeviceUdid(const NodeInfo *info)
return info->deviceInfo.deviceUdid;
}
int32_t LnnSetDeviceUdid(NodeInfo *info, const char *udid)
NO_SANITIZE("cfi") int32_t LnnSetDeviceUdid(NodeInfo *info, const char *udid)
{
if (info == NULL || udid == NULL) {
return SOFTBUS_INVALID_PARAM;
@ -55,7 +55,7 @@ int32_t LnnSetDeviceUdid(NodeInfo *info, const char *udid)
return SOFTBUS_OK;
}
int32_t LnnSetDiscoveryType(NodeInfo *info, DiscoveryType type)
NO_SANITIZE("cfi") int32_t LnnSetDiscoveryType(NodeInfo *info, DiscoveryType type)
{
if (info == NULL || type >= DISCOVERY_TYPE_COUNT) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para error!");
@ -75,7 +75,7 @@ NO_SANITIZE("cfi") int32_t LnnClearDiscoveryType(NodeInfo *info, DiscoveryType t
return SOFTBUS_OK;
}
bool LnnIsNodeOnline(const NodeInfo *info)
NO_SANITIZE("cfi") bool LnnIsNodeOnline(const NodeInfo *info)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para error!");
@ -84,7 +84,7 @@ bool LnnIsNodeOnline(const NodeInfo *info)
return (info->status == STATUS_ONLINE);
}
void LnnSetNodeConnStatus(NodeInfo *info, ConnectStatus status)
NO_SANITIZE("cfi") void LnnSetNodeConnStatus(NodeInfo *info, ConnectStatus status)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para error!!!");
@ -102,7 +102,7 @@ NO_SANITIZE("cfi") const char *LnnGetBtMac(const NodeInfo *info)
return info->connectInfo.macAddr;
}
void LnnSetBtMac(NodeInfo *info, const char *mac)
NO_SANITIZE("cfi") void LnnSetBtMac(NodeInfo *info, const char *mac)
{
if (info == NULL || mac == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "PARA ERROR!");
@ -123,7 +123,7 @@ NO_SANITIZE("cfi") const char *LnnGetNetIfName(const NodeInfo *info)
return info->connectInfo.netIfName;
}
void LnnSetNetIfName(NodeInfo *info, const char *netIfName)
NO_SANITIZE("cfi") void LnnSetNetIfName(NodeInfo *info, const char *netIfName)
{
if (info == NULL || netIfName == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "PARA ERROR!");
@ -144,7 +144,7 @@ NO_SANITIZE("cfi") const char *LnnGetWiFiIp(const NodeInfo *info)
return info->connectInfo.deviceIp;
}
void LnnSetWiFiIp(NodeInfo *info, const char *ip)
NO_SANITIZE("cfi") void LnnSetWiFiIp(NodeInfo *info, const char *ip)
{
if (info == NULL || ip == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "PARA ERROR!");
@ -165,7 +165,7 @@ NO_SANITIZE("cfi") const char *LnnGetMasterUdid(const NodeInfo *info)
return info->masterUdid;
}
int32_t LnnSetMasterUdid(NodeInfo *info, const char *udid)
NO_SANITIZE("cfi") int32_t LnnSetMasterUdid(NodeInfo *info, const char *udid)
{
if (info == NULL || udid == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "PARA ERROR!");
@ -187,7 +187,7 @@ NO_SANITIZE("cfi") int32_t LnnGetAuthPort(const NodeInfo *info)
return info->connectInfo.authPort;
}
int32_t LnnSetAuthPort(NodeInfo *info, int32_t port)
NO_SANITIZE("cfi") int32_t LnnSetAuthPort(NodeInfo *info, int32_t port)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para error.");
@ -206,7 +206,7 @@ NO_SANITIZE("cfi") int32_t LnnGetSessionPort(const NodeInfo *info)
return info->connectInfo.sessionPort;
}
int32_t LnnSetSessionPort(NodeInfo *info, int32_t port)
NO_SANITIZE("cfi") int32_t LnnSetSessionPort(NodeInfo *info, int32_t port)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para error!");
@ -225,7 +225,7 @@ NO_SANITIZE("cfi") int32_t LnnGetProxyPort(const NodeInfo *info)
return info->connectInfo.proxyPort;
}
int32_t LnnSetProxyPort(NodeInfo *info, int32_t port)
NO_SANITIZE("cfi") int32_t LnnSetProxyPort(NodeInfo *info, int32_t port)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para error!");
@ -235,7 +235,7 @@ int32_t LnnSetProxyPort(NodeInfo *info, int32_t port)
return SOFTBUS_OK;
}
int32_t LnnSetP2pRole(NodeInfo *info, int32_t p2pRole)
NO_SANITIZE("cfi") int32_t LnnSetP2pRole(NodeInfo *info, int32_t p2pRole)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "%s:invalid param.", __func__);
@ -254,7 +254,7 @@ NO_SANITIZE("cfi") int32_t LnnGetP2pRole(const NodeInfo *info)
return info->p2pInfo.p2pRole;
}
int32_t LnnSetP2pMac(NodeInfo *info, const char *p2pMac)
NO_SANITIZE("cfi") int32_t LnnSetP2pMac(NodeInfo *info, const char *p2pMac)
{
if (info == NULL || p2pMac == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "%s:invalid param.", __func__);
@ -276,7 +276,7 @@ NO_SANITIZE("cfi") const char *LnnGetP2pMac(const NodeInfo *info)
return info->p2pInfo.p2pMac;
}
int32_t LnnSetDataChangeFlag(NodeInfo *info, uint16_t dataChangeFlag)
NO_SANITIZE("cfi") int32_t LnnSetDataChangeFlag(NodeInfo *info, uint16_t dataChangeFlag)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "%s:invalid param.", __func__);
@ -295,7 +295,7 @@ NO_SANITIZE("cfi") uint16_t LnnGetDataChangeFlag(const NodeInfo *info)
return info->dataChangeFlag;
}
int32_t LnnSetP2pGoMac(NodeInfo *info, const char *goMac)
NO_SANITIZE("cfi") int32_t LnnSetP2pGoMac(NodeInfo *info, const char *goMac)
{
if (info == NULL || goMac == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "%s:invalid param.", __func__);
@ -327,7 +327,7 @@ NO_SANITIZE("cfi") uint64_t LnnGetSupportedProtocols(const NodeInfo *info)
return info->supportedProtocols;
}
int32_t LnnSetSupportedProtocols(NodeInfo *info, uint64_t protocols)
NO_SANITIZE("cfi") int32_t LnnSetSupportedProtocols(NodeInfo *info, uint64_t protocols)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para error!");

View File

@ -75,7 +75,7 @@ typedef struct {
static DistributedNetLedger g_distributedNetLedger;
int32_t LnnSetAuthTypeValue(uint32_t *authTypeValue, AuthType type)
NO_SANITIZE("cfi") int32_t LnnSetAuthTypeValue(uint32_t *authTypeValue, AuthType type)
{
if (authTypeValue == NULL || type >= AUTH_TYPE_BUTT) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "in para error!");
@ -858,7 +858,7 @@ static void UpdateAuthSeq(const NodeInfo *oldInfo, NodeInfo *info)
}
}
int32_t LnnUpdateNodeInfo(NodeInfo *newInfo)
NO_SANITIZE("cfi") int32_t LnnUpdateNodeInfo(NodeInfo *newInfo)
{
const char *udid = NULL;
DoubleHashMap *map = NULL;
@ -1010,7 +1010,7 @@ NO_SANITIZE("cfi") ReportCategory LnnAddOnlineNode(NodeInfo *info)
return REPORT_NONE;
}
ReportCategory LnnSetNodeOffline(const char *udid, ConnectionAddrType type, int32_t authId)
NO_SANITIZE("cfi") ReportCategory LnnSetNodeOffline(const char *udid, ConnectionAddrType type, int32_t authId)
{
NodeInfo *info = NULL;
@ -1069,7 +1069,7 @@ NO_SANITIZE("cfi") int32_t LnnGetBasicInfoByUdid(const char *udid, NodeBasicInfo
return ret;
}
void LnnRemoveNode(const char *udid)
NO_SANITIZE("cfi") void LnnRemoveNode(const char *udid)
{
DoubleHashMap *map = &g_distributedNetLedger.distributedInfo;
if (udid == NULL) {
@ -1165,7 +1165,7 @@ NO_SANITIZE("cfi") int32_t LnnGetLnnRelation(const char *id, IdCategory type, ui
return SOFTBUS_OK;
}
bool LnnSetDLDeviceInfoName(const char *udid, const char *name)
NO_SANITIZE("cfi") bool LnnSetDLDeviceInfoName(const char *udid, const char *name)
{
DoubleHashMap *map = &g_distributedNetLedger.distributedInfo;
NodeInfo *info = NULL;
@ -1198,7 +1198,7 @@ EXIT:
return false;
}
bool LnnSetDLP2pInfo(const char *networkId, const P2pInfo *info)
NO_SANITIZE("cfi") bool LnnSetDLP2pInfo(const char *networkId, const P2pInfo *info)
{
NodeInfo *node = NULL;
if (networkId == NULL || info == NULL) {
@ -1508,7 +1508,7 @@ NO_SANITIZE("cfi") int32_t LnnGetLaneCount(int32_t laneId)
return g_distributedNetLedger.laneCount[laneId];
}
int32_t LnnSetLaneCount(int32_t laneId, int32_t num)
NO_SANITIZE("cfi") int32_t LnnSetLaneCount(int32_t laneId, int32_t num)
{
if (laneId < 0 || laneId >= LNN_LINK_TYPE_BUTT) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "laneId is error! laneId:%d", laneId);
@ -1544,7 +1544,7 @@ NO_SANITIZE("cfi") int32_t LnnGetDLHeartbeatTimestamp(const char *networkId, uin
return SOFTBUS_OK;
}
int32_t LnnSetDLHeartbeatTimestamp(const char *networkId, uint64_t timestamp)
NO_SANITIZE("cfi") int32_t LnnSetDLHeartbeatTimestamp(const char *networkId, uint64_t timestamp)
{
if (SoftBusMutexLock(&g_distributedNetLedger.lock) != 0) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "lock mutex fail!");
@ -1561,7 +1561,7 @@ int32_t LnnSetDLHeartbeatTimestamp(const char *networkId, uint64_t timestamp)
return SOFTBUS_OK;
}
int32_t LnnSetDLConnCapability(const char *networkId, uint64_t connCapability)
NO_SANITIZE("cfi") int32_t LnnSetDLConnCapability(const char *networkId, uint64_t connCapability)
{
if (SoftBusMutexLock(&g_distributedNetLedger.lock) != 0) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "lock mutex fail!");
@ -1578,7 +1578,7 @@ int32_t LnnSetDLConnCapability(const char *networkId, uint64_t connCapability)
return SOFTBUS_OK;
}
int32_t LnnSetDLNodeAddr(const char *id, IdCategory type, const char *addr)
NO_SANITIZE("cfi") int32_t LnnSetDLNodeAddr(const char *id, IdCategory type, const char *addr)
{
if (SoftBusMutexLock(&g_distributedNetLedger.lock) != 0) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "lock mutex fail!");
@ -1713,7 +1713,7 @@ static void RefreshDeviceOnlineStateInfo(DeviceInfo *device, const InnerDeviceIn
}
}
void LnnRefreshDeviceOnlineStateAndDevIdInfo(const char *pkgName, DeviceInfo *device,
NO_SANITIZE("cfi") void LnnRefreshDeviceOnlineStateAndDevIdInfo(const char *pkgName, DeviceInfo *device,
const InnerDeviceInfoAddtions *addtions)
{
(void)pkgName;

View File

@ -818,7 +818,7 @@ static bool JudgeString(const char *info, int32_t len)
return (len <= 0) ? false : IsValidString(info, (uint32_t)len);
}
int32_t LnnSetLocalStrInfo(InfoKey key, const char *info)
NO_SANITIZE("cfi") int32_t LnnSetLocalStrInfo(InfoKey key, const char *info)
{
uint32_t i;
int32_t ret;
@ -891,7 +891,7 @@ NO_SANITIZE("cfi") int32_t LnnGetLocalNum64Info(InfoKey key, int64_t *info)
return LnnGetLocalInfo(key, (void*)info, sizeof(int64_t));
}
int32_t LnnSetLocalNum64Info(InfoKey key, int64_t info)
NO_SANITIZE("cfi") int32_t LnnSetLocalNum64Info(InfoKey key, int64_t info)
{
return LnnSetLocalInfo(key, (void*)&info);
}
@ -901,12 +901,12 @@ NO_SANITIZE("cfi") int32_t LnnGetLocalNum16Info(InfoKey key, int16_t *info)
return LnnGetLocalInfo(key, (void*)info, sizeof(int16_t));
}
int32_t LnnSetLocalNum16Info(InfoKey key, int16_t info)
NO_SANITIZE("cfi") int32_t LnnSetLocalNum16Info(InfoKey key, int16_t info)
{
return LnnSetLocalInfo(key, (void*)&info);
}
int32_t LnnSetLocalNumInfo(InfoKey key, int32_t info)
NO_SANITIZE("cfi") int32_t LnnSetLocalNumInfo(InfoKey key, int32_t info)
{
return LnnSetLocalInfo(key, (void*)&info);
}
@ -1037,7 +1037,7 @@ NO_SANITIZE("cfi") void LnnDeinitLocalLedger(void)
g_localNetLedger.status = LL_INIT_UNKNOWN;
}
bool LnnIsMasterNode(void)
NO_SANITIZE("cfi") bool LnnIsMasterNode(void)
{
bool ret = false;
if (SoftBusMutexLock(&g_localNetLedger.lock) != 0) {

View File

@ -190,7 +190,7 @@ static void NotifyEvent(const LnnEventBasicInfo *info)
(void)SoftBusMutexUnlock(&g_eventCtrl.lock);
}
void LnnNotifyOnlineState(bool isOnline, NodeBasicInfo *info)
NO_SANITIZE("cfi") void LnnNotifyOnlineState(bool isOnline, NodeBasicInfo *info)
{
LnnOnlineStateEventInfo eventInfo;
@ -208,7 +208,7 @@ void LnnNotifyOnlineState(bool isOnline, NodeBasicInfo *info)
NotifyEvent((LnnEventBasicInfo *)&eventInfo);
}
void LnnNotifyBasicInfoChanged(NodeBasicInfo *info, NodeBasicInfoType type)
NO_SANITIZE("cfi") void LnnNotifyBasicInfoChanged(NodeBasicInfo *info, NodeBasicInfoType type)
{
if (info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para : info = null!");
@ -220,7 +220,7 @@ void LnnNotifyBasicInfoChanged(NodeBasicInfo *info, NodeBasicInfoType type)
(void)PostNotifyMessage(NOTIFY_NODE_BASIC_INFO_CHANGED, (uint64_t)type, info);
}
void LnnNotifyJoinResult(ConnectionAddr *addr, const char *networkId, int32_t retCode)
NO_SANITIZE("cfi") void LnnNotifyJoinResult(ConnectionAddr *addr, const char *networkId, int32_t retCode)
{
if (addr == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para : addr or networkId = null!");
@ -230,7 +230,7 @@ void LnnNotifyJoinResult(ConnectionAddr *addr, const char *networkId, int32_t re
LnnIpcNotifyJoinResult(addr, sizeof(ConnectionAddr), networkId, retCode);
}
void MetaNodeNotifyJoinResult(ConnectionAddr *addr, const char *networkId, int32_t retCode)
NO_SANITIZE("cfi") void MetaNodeNotifyJoinResult(ConnectionAddr *addr, const char *networkId, int32_t retCode)
{
if (addr == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para : addr or networkId = null!");
@ -240,7 +240,7 @@ void MetaNodeNotifyJoinResult(ConnectionAddr *addr, const char *networkId, int32
MetaNodeIpcNotifyJoinResult(addr, sizeof(ConnectionAddr), networkId, retCode);
}
void LnnNotifyLeaveResult(const char *networkId, int32_t retCode)
NO_SANITIZE("cfi") void LnnNotifyLeaveResult(const char *networkId, int32_t retCode)
{
if (networkId == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para : networkId = null!");
@ -250,7 +250,7 @@ void LnnNotifyLeaveResult(const char *networkId, int32_t retCode)
LnnIpcNotifyLeaveResult(networkId, retCode);
}
void MetaNodeNotifyLeaveResult(const char *networkId, int32_t retCode)
NO_SANITIZE("cfi") void MetaNodeNotifyLeaveResult(const char *networkId, int32_t retCode)
{
if (networkId == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "para : networkId = null!");
@ -260,7 +260,8 @@ void MetaNodeNotifyLeaveResult(const char *networkId, int32_t retCode)
MetaNodeIpcNotifyLeaveResult(networkId, retCode);
}
void LnnNotifyLnnRelationChanged(const char *udid, ConnectionAddrType type, uint8_t relation, bool isJoin)
NO_SANITIZE("cfi") void LnnNotifyLnnRelationChanged(const char *udid, ConnectionAddrType type, uint8_t relation,
bool isJoin)
{
LnnRelationChanedEventInfo info;
@ -272,7 +273,7 @@ void LnnNotifyLnnRelationChanged(const char *udid, ConnectionAddrType type, uint
NotifyEvent((LnnEventBasicInfo *)&info);
}
void LnnNotifyTimeSyncResult(const char *pkgName, const TimeSyncResultInfo *info, int32_t retCode)
NO_SANITIZE("cfi") void LnnNotifyTimeSyncResult(const char *pkgName, const TimeSyncResultInfo *info, int32_t retCode)
{
if (pkgName == NULL || info == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "invalid paramters");
@ -282,7 +283,7 @@ void LnnNotifyTimeSyncResult(const char *pkgName, const TimeSyncResultInfo *info
LnnIpcNotifyTimeSyncResult(pkgName, info, sizeof(TimeSyncResultInfo), retCode);
}
void LnnNotifyWlanStateChangeEvent(SoftBusWifiState state)
NO_SANITIZE("cfi") void LnnNotifyWlanStateChangeEvent(SoftBusWifiState state)
{
if (state < SOFTBUS_WIFI_CONNECTED || state > SOFTBUS_WIFI_UNKNOWN) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "bad state %d", state);
@ -292,7 +293,7 @@ void LnnNotifyWlanStateChangeEvent(SoftBusWifiState state)
NotifyEvent((const LnnEventBasicInfo *)&event);
}
void LnnNotifyScreenStateChangeEvent(SoftBusScreenState state)
NO_SANITIZE("cfi") void LnnNotifyScreenStateChangeEvent(SoftBusScreenState state)
{
if (state < SOFTBUS_SCREEN_ON || state >= SOFTBUS_SCREEN_UNKNOWN) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "bad state %d", state);
@ -315,7 +316,7 @@ void LnnNotifyBtStateChangeEvent(void *state)
SoftBusFree(btState);
}
void LnnNotifyBtAclStateChangeEvent(const char *btMac, SoftBusBtAclState state)
NO_SANITIZE("cfi") void LnnNotifyBtAclStateChangeEvent(const char *btMac, SoftBusBtAclState state)
{
if (btMac == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "invalid btMac, state = %d", state);
@ -331,7 +332,7 @@ void LnnNotifyBtAclStateChangeEvent(const char *btMac, SoftBusBtAclState state)
NotifyEvent((const LnnEventBasicInfo *)&event);
}
void LnnNotifyAddressChangedEvent(const char *ifName)
NO_SANITIZE("cfi") void LnnNotifyAddressChangedEvent(const char *ifName)
{
LnnMonitorAddressChangedEvent event = {.basic.event = LNN_EVENT_IP_ADDR_CHANGED, .ifName = {0}};
if (ifName != NULL) {
@ -344,7 +345,7 @@ void LnnNotifyAddressChangedEvent(const char *ifName)
NotifyEvent((const LnnEventBasicInfo *)&event);
}
void LnnNotifyMasterNodeChanged(bool isMaster, const char *masterNodeUdid, int32_t weight)
NO_SANITIZE("cfi") void LnnNotifyMasterNodeChanged(bool isMaster, const char *masterNodeUdid, int32_t weight)
{
LnnMasterNodeChangedEvent event = {.basic.event = LNN_EVENT_NODE_MASTER_STATE_CHANGED,
.isMasterNode = isMaster,
@ -354,7 +355,7 @@ void LnnNotifyMasterNodeChanged(bool isMaster, const char *masterNodeUdid, int32
NotifyEvent((const LnnEventBasicInfo *)&event);
}
void LnnNotifyNodeAddressChanged(const char *addr)
NO_SANITIZE("cfi") void LnnNotifyNodeAddressChanged(const char *addr)
{
if (addr == NULL) {
SoftBusLog(SOFTBUS_LOG_LNN, SOFTBUS_LOG_ERROR, "%s:nullptr!", __func__);
@ -405,7 +406,7 @@ NO_SANITIZE("cfi") void LnnDeinitBusCenterEvent(void)
SoftBusMutexDestroy(&g_eventCtrl.lock);
}
int32_t LnnRegisterEventHandler(LnnEventType event, LnnEventHandler handler)
NO_SANITIZE("cfi") int32_t LnnRegisterEventHandler(LnnEventType event, LnnEventHandler handler)
{
LnnEventHandlerItem *item = NULL;
@ -433,7 +434,7 @@ int32_t LnnRegisterEventHandler(LnnEventType event, LnnEventHandler handler)
return SOFTBUS_OK;
}
void LnnUnregisterEventHandler(LnnEventType event, LnnEventHandler handler)
NO_SANITIZE("cfi") void LnnUnregisterEventHandler(LnnEventType event, LnnEventHandler handler)
{
LnnEventHandlerItem *item = NULL;

View File

@ -21,7 +21,7 @@
#include "softbus_def.h"
#include "softbus_log.h"
bool LnnIsSameConnectionAddr(const ConnectionAddr *addr1, const ConnectionAddr *addr2)
NO_SANITIZE("cfi") bool LnnIsSameConnectionAddr(const ConnectionAddr *addr1, const ConnectionAddr *addr2)
{
if (addr1 == NULL || addr2 == NULL) {
return false;

View File

@ -21,6 +21,7 @@
#include <securec.h>
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#define HDF_MIN_MAP_SIZE 8
@ -125,7 +126,7 @@ static MapNode *MapCreateNode(const char *key, uint32_t hash,
* valueSize Map value size
* @return : SOFTBUS_OK or other error
*/
int32_t LnnMapSet(Map *map, const char *key, const void *value, uint32_t valueSize)
NO_SANITIZE("cfi") int32_t LnnMapSet(Map *map, const char *key, const void *value, uint32_t valueSize)
{
MapNode *node = NULL;
@ -184,7 +185,7 @@ int32_t LnnMapSet(Map *map, const char *key, const void *value, uint32_t valueSi
* key Map key
* @return : value of key or NULL
*/
void* LnnMapGet(const Map *map, const char *key)
NO_SANITIZE("cfi") void* LnnMapGet(const Map *map, const char *key)
{
if (map == NULL || key == NULL || map->nodeSize == 0 || map->nodes == NULL) {
return NULL;
@ -211,7 +212,7 @@ void* LnnMapGet(const Map *map, const char *key)
* @param : map Map see details in type Map
* key Map key
*/
int32_t LnnMapErase(Map *map, const char *key)
NO_SANITIZE("cfi") int32_t LnnMapErase(Map *map, const char *key)
{
if (map == NULL || key == NULL || map->nodeSize == 0 || map->nodes == NULL) {
return SOFTBUS_INVALID_PARAM;
@ -240,7 +241,7 @@ int32_t LnnMapErase(Map *map, const char *key)
return SOFTBUS_ERR;
}
uint32_t MapGetSize(Map *map)
NO_SANITIZE("cfi") uint32_t MapGetSize(Map *map)
{
return (map == NULL) ? 0 : map->nodeSize;
}
@ -249,7 +250,7 @@ uint32_t MapGetSize(Map *map)
*
* @param : map Map see details in type Map
*/
void LnnMapInit(Map *map)
NO_SANITIZE("cfi") void LnnMapInit(Map *map)
{
if (map == NULL) {
return;
@ -265,7 +266,7 @@ void LnnMapInit(Map *map)
*
* @param : map Map see details in type Map
*/
void LnnMapDelete(Map *map)
NO_SANITIZE("cfi") void LnnMapDelete(Map *map)
{
uint32_t i;
MapNode *node = NULL;
@ -296,7 +297,7 @@ void LnnMapDelete(Map *map)
*
* @param : map Map see details in type Map
*/
MapIterator *LnnMapInitIterator(Map *map)
NO_SANITIZE("cfi") MapIterator *LnnMapInitIterator(Map *map)
{
MapIterator *it = NULL;
if (map == NULL) {
@ -318,7 +319,7 @@ MapIterator *LnnMapInitIterator(Map *map)
*
* @param : it Iterator see details in type Iterator
*/
bool LnnMapHasNext(MapIterator *it)
NO_SANITIZE("cfi") bool LnnMapHasNext(MapIterator *it)
{
return (it->nodeNum < it->map->nodeSize);
}
@ -328,7 +329,7 @@ bool LnnMapHasNext(MapIterator *it)
*
* @param : it Iterator see details in type Iterator
*/
MapIterator *LnnMapNext(MapIterator *it)
NO_SANITIZE("cfi") MapIterator *LnnMapNext(MapIterator *it)
{
MapNode *node = NULL;
if (it == NULL) {
@ -358,7 +359,7 @@ MapIterator *LnnMapNext(MapIterator *it)
*
* @param : it Iterator see details in type Iterator
*/
void LnnMapDeinitIterator(MapIterator *it)
NO_SANITIZE("cfi") void LnnMapDeinitIterator(MapIterator *it)
{
if (it == NULL) {
return;

View File

@ -389,7 +389,7 @@ static bool HaveGrantedPermission(const char *sessionName)
return false;
}
int32_t LoadPermissionJson(const char *fileName)
NO_SANITIZE("cfi") int32_t LoadPermissionJson(const char *fileName)
{
int ret = ReadConfigJson(fileName);
if (ret != SOFTBUS_OK) {

View File

@ -29,6 +29,7 @@
#include "securec.h"
#include "softbus_adapter_crypto.h"
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_utils.h"
@ -197,7 +198,7 @@ NO_SANITIZE("cfi") static void InnerP2pPeersChangedCallback(WifiP2pDevice* devic
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "InnerP2pPeersChangedCallback len %d.", len);
}
int32_t P2pLinkAdapterInit(const BroadcastRecvCb *cb)
NO_SANITIZE("cfi") int32_t P2pLinkAdapterInit(const BroadcastRecvCb *cb)
{
WifiErrorCode ret;
@ -290,7 +291,7 @@ static bool GetIpAddr(const char *ifName, char *ipAddr, int32_t len)
return true;
}
int32_t P2pLinkGetP2pIpAddress(char *ip, int32_t len)
NO_SANITIZE("cfi") int32_t P2pLinkGetP2pIpAddress(char *ip, int32_t len)
{
WifiP2pGroupInfo* groupInfo;
char ipAddr[P2P_IP_LEN] = {0};
@ -326,7 +327,7 @@ int32_t P2pLinkGetP2pIpAddress(char *ip, int32_t len)
}
#define P2P_BASE_INTERFACE "p2p0"
int32_t P2pLinkGetBaseMacAddress(char *mac, int32_t len)
NO_SANITIZE("cfi") int32_t P2pLinkGetBaseMacAddress(char *mac, int32_t len)
{
unsigned char macAddr[MAC_BIN_LEN] = {0};
@ -368,7 +369,7 @@ int32_t P2pLinkSharelinkReuse(void)
}
P2pLink5GList *P2pLinkGetChannelListFor5G(void)
NO_SANITIZE("cfi") P2pLink5GList *P2pLinkGetChannelListFor5G(void)
{
int32_t chanList[CHAN_LIST_LEN] = {0};
int32_t ret = Hid2dGetChannelListFor5G(chanList, CHAN_LIST_LEN);
@ -406,7 +407,7 @@ P2pLink5GList *P2pLinkGetChannelListFor5G(void)
}
int32_t P2pLinkGetFrequency(void)
NO_SANITIZE("cfi") int32_t P2pLinkGetFrequency(void)
{
int32_t ret;
WifiLinkedInfo wifiInfo;
@ -420,7 +421,7 @@ int32_t P2pLinkGetFrequency(void)
return wifiInfo.frequency;
}
int32_t P2pLinkCreateGroup(int32_t freq, bool isWideBandSupport)
NO_SANITIZE("cfi") int32_t P2pLinkCreateGroup(int32_t freq, bool isWideBandSupport)
{
FreqType type = FREQUENCY_DEFAULT;
if (isWideBandSupport) {
@ -435,7 +436,7 @@ int32_t P2pLinkCreateGroup(int32_t freq, bool isWideBandSupport)
return SOFTBUS_OK;
}
int32_t P2pLinkGetRecommendChannel(int32_t *freq)
NO_SANITIZE("cfi") int32_t P2pLinkGetRecommendChannel(int32_t *freq)
{
if (freq == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "get recommand channel, invalid param.");
@ -464,7 +465,7 @@ int32_t P2pLinkGetRecommendChannel(int32_t *freq)
return SOFTBUS_ERR;
}
char *P2pLinkGetGroupConfigInfo(void)
NO_SANITIZE("cfi") char *P2pLinkGetGroupConfigInfo(void)
{
WifiP2pGroupInfo *groupInfo = NULL;
int32_t ret;
@ -514,7 +515,7 @@ char *P2pLinkGetGroupConfigInfo(void)
return groupCfgStr;
}
int32_t P2pLinkConnectGroup(const char *groupConfig)
NO_SANITIZE("cfi") int32_t P2pLinkConnectGroup(const char *groupConfig)
{
if (groupConfig == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "connect group, invalid param.");
@ -611,7 +612,7 @@ static int32_t ConvertIpStringToIntArray(unsigned int dest[IPV4_ARRAY_LEN], cons
return SOFTBUS_OK;
}
int32_t P2pLinkConfigGcIp(const char *ip)
NO_SANITIZE("cfi") int32_t P2pLinkConfigGcIp(const char *ip)
{
if (ip == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "config ip, invalid param.");
@ -655,7 +656,7 @@ int32_t P2pLinkConfigGcIp(const char *ip)
return SOFTBUS_OK;
}
int32_t P2pLinkGetSelfWifiCfgInfo(char *cfgData, int32_t len)
NO_SANITIZE("cfi") int32_t P2pLinkGetSelfWifiCfgInfo(char *cfgData, int32_t len)
{
if (cfgData == NULL || len == 0) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "get self wifi config, invalid param.");
@ -753,7 +754,7 @@ int32_t P2pLinkReleaseIPAddr(void)
return SOFTBUS_OK;
}
int32_t P2pLinkGetWifiState(void)
NO_SANITIZE("cfi") int32_t P2pLinkGetWifiState(void)
{
int wifiState;

View File

@ -35,7 +35,7 @@ static char g_interface[P2PLINK_INTERFACE_LEN] = {0};
static bool g_p2plinkState = false;
static bool g_p2plinkDhcp = false;
P2pLinkRole P2pLinkGetRole(void)
NO_SANITIZE("cfi") P2pLinkRole P2pLinkGetRole(void)
{
return g_role;
}
@ -55,12 +55,12 @@ void P2pLinkSetMyIp(const char *ip)
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "set my ip.");
}
char* P2pLinkGetMyIp(void)
NO_SANITIZE("cfi") char* P2pLinkGetMyIp(void)
{
return g_myIp;
}
char* P2pLinkGetMyMac(void)
NO_SANITIZE("cfi") char* P2pLinkGetMyMac(void)
{
char myMac[P2P_MAC_LEN] = {0};
@ -106,12 +106,12 @@ void P2pLinkSetGcPort(int32_t port)
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "set gc port %d", g_goPort);
}
int32_t P2pLinkGetGcPort(void)
NO_SANITIZE("cfi") int32_t P2pLinkGetGcPort(void)
{
return g_gcPort;
}
char* P2pLinkGetGoIp(void)
NO_SANITIZE("cfi") char* P2pLinkGetGoIp(void)
{
if (g_role == ROLE_GO) {
return P2pLinkGetMyIp();
@ -119,7 +119,7 @@ char* P2pLinkGetGoIp(void)
return g_goIp;
}
char* P2pLinkGetGoMac(void)
NO_SANITIZE("cfi") char* P2pLinkGetGoMac(void)
{
if (g_role == ROLE_GO) {
return P2pLinkGetMyMac();
@ -127,7 +127,7 @@ char* P2pLinkGetGoMac(void)
return g_goMac;
}
int32_t P2pLinkGetGoPort(void)
NO_SANITIZE("cfi") int32_t P2pLinkGetGoPort(void)
{
return g_goPort;
}
@ -152,7 +152,7 @@ void P2pLinkSetDhcpState(bool isNeedDhcp)
g_p2plinkDhcp = isNeedDhcp;
}
bool P2pLinkGetDhcpState(void)
NO_SANITIZE("cfi") bool P2pLinkGetDhcpState(void)
{
return g_p2plinkDhcp;
}
@ -167,14 +167,14 @@ void P2pLinkSetDisconnectState(bool state)
g_isDisconnect = state;
}
void P2pLinkCommonInit(void)
NO_SANITIZE("cfi") void P2pLinkCommonInit(void)
{
g_macExpired = true;
g_role = ROLE_NONE;
return;
}
void P2pLinkCommonClean(void)
NO_SANITIZE("cfi") void P2pLinkCommonClean(void)
{
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "P2pLinkCommonClean");
g_role = ROLE_NONE;

View File

@ -47,7 +47,7 @@ typedef struct {
sem_t wait;
} QueryP2pDevIsOnline;
int32_t P2pLinkGetRequestId(void)
NO_SANITIZE("cfi") int32_t P2pLinkGetRequestId(void)
{
static int32_t requestId = 0;
requestId++;
@ -62,7 +62,7 @@ int32_t P2pLinkInit(void)
return P2pLinkManagerInit();
}
int32_t P2pLinkConnectDevice(const P2pLinkConnectInfo *info)
NO_SANITIZE("cfi") int32_t P2pLinkConnectDevice(const P2pLinkConnectInfo *info)
{
int32_t ret;
@ -90,7 +90,7 @@ int32_t P2pLinkConnectDevice(const P2pLinkConnectInfo *info)
return ret;
}
int32_t P2pLinkDisconnectDevice(const P2pLinkDisconnectInfo *info)
NO_SANITIZE("cfi") int32_t P2pLinkDisconnectDevice(const P2pLinkDisconnectInfo *info)
{
int32_t ret;
@ -221,7 +221,7 @@ static void LoopP2pLinkQueryIpByMac(P2pLoopMsg msgType, void *arg)
return;
}
int32_t P2pLinkGetPeerMacByPeerIp(const char *peerIp, char* peerMac, int32_t macLen)
NO_SANITIZE("cfi") int32_t P2pLinkGetPeerMacByPeerIp(const char *peerIp, char* peerMac, int32_t macLen)
{
QueryP2pMacLoopInfo queryInfo;
int32_t ret;
@ -275,7 +275,7 @@ void P2pLinkRegPeerDevStateChange(const P2pLinkPeerDevStateCb *cb)
P2pLinkSetDevStateCallback(cb);
}
int32_t P2pLinkGetLocalIp(char *localIp, int32_t localIpLen)
NO_SANITIZE("cfi") int32_t P2pLinkGetLocalIp(char *localIp, int32_t localIpLen)
{
char tmpIp[P2P_IP_LEN] = {0};
int32_t ret;

View File

@ -25,6 +25,7 @@
#include "securec.h"
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
@ -223,7 +224,7 @@ static void WifiCfgChanged(const char *wificfg)
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "wificfg = %s", wificfg);
}
int32_t P2pLinkBroadCastInit(void)
NO_SANITIZE("cfi") int32_t P2pLinkBroadCastInit(void)
{
BroadcastRecvCb cb;

View File

@ -23,6 +23,7 @@
#include "p2plink_reference.h"
#include "securec.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_json_utils.h"
#include "softbus_log.h"
@ -255,7 +256,7 @@ int32_t P2pLinkSendReuseResponse(const P2pLinkAuthId *chan, const char *myMac, i
return SOFTBUS_OK;
}
void P2pLinkHandleHandshake(int64_t authId, int32_t seq, const cJSON *root)
NO_SANITIZE("cfi") void P2pLinkHandleHandshake(int64_t authId, int32_t seq, const cJSON *root)
{
char mac[P2P_MAC_LEN] = {0};
char ip[P2P_IP_LEN] = {0};
@ -281,7 +282,7 @@ void P2pLinkHandleHandshake(int64_t authId, int32_t seq, const cJSON *root)
}
}
void P2pLinkHandleReuseResponse(int64_t authId, int32_t seq, const cJSON *root)
NO_SANITIZE("cfi") void P2pLinkHandleReuseResponse(int64_t authId, int32_t seq, const cJSON *root)
{
char peerMac[P2P_MAC_LEN] = {0};
int32_t respRet = 0;
@ -331,7 +332,7 @@ void P2pLinkHandleReuseResponse(int64_t authId, int32_t seq, const cJSON *root)
P2pLinkDumpRef();
}
void P2pLinkHandleReuseRequest(int64_t authId, int32_t seq, const cJSON *root)
NO_SANITIZE("cfi") void P2pLinkHandleReuseRequest(int64_t authId, int32_t seq, const cJSON *root)
{
char peerMac[P2P_MAC_LEN] = {0};
int32_t respRet;
@ -382,7 +383,7 @@ void P2pLinkHandleReuseRequest(int64_t authId, int32_t seq, const cJSON *root)
(void)P2pLinkSendReuseResponse(&linkAuthId, P2pLinkGetMyMac(), respRet);
}
}
void P2pLinkHandleDisconnectCmd(int64_t authId, int32_t seq, const cJSON *root)
NO_SANITIZE("cfi") void P2pLinkHandleDisconnectCmd(int64_t authId, int32_t seq, const cJSON *root)
{
P2pLinkRole myRole = P2pLinkGetRole();
int32_t myRef = P2pLinkGetMyP2pRef();
@ -437,7 +438,7 @@ void P2pLinkHandleWifiCfg(int64_t authId, int32_t seq, const cJSON *root)
}
}
void P2pLinkControlMsgProc(int64_t authId, int64_t seq, P2pLinkCmdType type, const cJSON *root)
NO_SANITIZE("cfi") void P2pLinkControlMsgProc(int64_t authId, int64_t seq, P2pLinkCmdType type, const cJSON *root)
{
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "recv control msgtype %d", type);
if (P2pLinkIsEnable() == false) {

View File

@ -50,7 +50,7 @@ void P2pLinkSetDevStateCallback(const P2pLinkPeerDevStateCb *cb)
(void)memcpy_s(&g_devStateCb, sizeof(P2pLinkPeerDevStateCb), cb, sizeof(P2pLinkPeerDevStateCb));
}
void P2pLinkDevOffLineNotify(const char *peerMac)
NO_SANITIZE("cfi") void P2pLinkDevOffLineNotify(const char *peerMac)
{
if (g_devStateCb.onDevOffline != NULL) {
g_devStateCb.onDevOffline(peerMac);
@ -65,13 +65,13 @@ void P2pLinkMyRoleChangeNotify(P2pLinkRole myRole)
}
}
void P2pLinkAddConnedDev(ConnectedNode *item)
NO_SANITIZE("cfi") void P2pLinkAddConnedDev(ConnectedNode *item)
{
ListAdd(&g_connectedDevices, &item->node);
g_connectedCnt++;
}
ConnectedNode *P2pLinkGetConnedDevByMac(const char *peerMac)
NO_SANITIZE("cfi") ConnectedNode *P2pLinkGetConnedDevByMac(const char *peerMac)
{
ConnectedNode *item = NULL;
ConnectedNode *next = NULL;
@ -94,7 +94,7 @@ void P2pLinkUpdateInAuthId(const char *peerMac, int64_t authId)
item->chanId.inAuthId = authId;
}
ConnectedNode *P2pLinkGetConnedDevByPeerIp(const char *peerIp)
NO_SANITIZE("cfi") ConnectedNode *P2pLinkGetConnedDevByPeerIp(const char *peerIp)
{
ConnectedNode *item = NULL;
ConnectedNode *next = NULL;
@ -107,7 +107,7 @@ ConnectedNode *P2pLinkGetConnedDevByPeerIp(const char *peerIp)
return NULL;
}
int32_t P2pLinkConnedIsEmpty(void)
NO_SANITIZE("cfi") int32_t P2pLinkConnedIsEmpty(void)
{
if (IsListEmpty(&g_connectedDevices)) {
return SOFTBUS_OK;
@ -115,7 +115,7 @@ int32_t P2pLinkConnedIsEmpty(void)
return SOFTBUS_ERR;
}
ConnectedNode *P2pLinkGetConnedByAuthReqeustId(uint32_t reqeustId)
NO_SANITIZE("cfi") ConnectedNode *P2pLinkGetConnedByAuthReqeustId(uint32_t reqeustId)
{
ConnectedNode *item = NULL;
ConnectedNode *next = NULL;
@ -128,7 +128,7 @@ ConnectedNode *P2pLinkGetConnedByAuthReqeustId(uint32_t reqeustId)
return NULL;
}
void P2pLinkDelConnedByAuthId(int64_t authId)
NO_SANITIZE("cfi") void P2pLinkDelConnedByAuthId(int64_t authId)
{
ConnectedNode *item = NULL;
ConnectedNode *next = NULL;
@ -249,7 +249,7 @@ static void P2pLinkCleanConnedDev(void)
return;
}
ConnectingNode *P2pLinkGetConningByPeerMacState(const char *peerMac, int state)
NO_SANITIZE("cfi") ConnectingNode *P2pLinkGetConningByPeerMacState(const char *peerMac, int state)
{
ConnectingNode *item = NULL;
ConnectingNode *next = NULL;
@ -262,7 +262,7 @@ ConnectingNode *P2pLinkGetConningByPeerMacState(const char *peerMac, int state)
return NULL;
}
ConnectingNode *P2pLinkGetConningDevByReqId(int32_t reqId)
NO_SANITIZE("cfi") ConnectingNode *P2pLinkGetConningDevByReqId(int32_t reqId)
{
ConnectingNode *item = NULL;
ConnectingNode *next = NULL;
@ -275,7 +275,7 @@ ConnectingNode *P2pLinkGetConningDevByReqId(int32_t reqId)
return NULL;
}
void P2pLinkDelConning(int32_t reqId)
NO_SANITIZE("cfi") void P2pLinkDelConning(int32_t reqId)
{
ConnectingNode *item = NULL;
ConnectingNode *next = NULL;
@ -290,14 +290,14 @@ void P2pLinkDelConning(int32_t reqId)
}
}
void P2pLinkDelConningDev(ConnectingNode *item)
NO_SANITIZE("cfi") void P2pLinkDelConningDev(ConnectingNode *item)
{
ListDelete(&item->node);
SoftBusFree(item);
g_connectingCnt--;
}
void P2pLinkConningCallback(const ConnectingNode *item, int32_t ret, int32_t failReason)
NO_SANITIZE("cfi") void P2pLinkConningCallback(const ConnectingNode *item, int32_t ret, int32_t failReason)
{
const P2pLinkConnectInfo *devInfo = &item->connInfo;
if (ret == SOFTBUS_ERR) {
@ -462,7 +462,7 @@ static void P2pLinkTimerDevProc(P2pLoopMsg msgType, void *arg)
P2pLoopProcDelay(P2pLinkTimerDevProc, 0, CONNING_TIMER_1S, P2PLOOP_CONNINGDEV_TIMER);
}
void P2pLinkAddConningDev(ConnectingNode *item)
NO_SANITIZE("cfi") void P2pLinkAddConningDev(ConnectingNode *item)
{
ListAdd(&g_connectingDevices, &item->node);
g_connectingCnt++;
@ -487,7 +487,7 @@ static void P2pLinkCleanConningDev(void)
}
}
void P2pLinkDumpDev(void)
NO_SANITIZE("cfi") void P2pLinkDumpDev(void)
{
ConnectingNode *conningItem = NULL;
ConnectingNode *conningNext = NULL;
@ -514,7 +514,7 @@ void P2pLinkDevEnterDiscState(void)
P2pLoopProcDelay(P2pLinkDevExistDiscState, NULL, DISCONNING_TIMER_3S, P2PLOOP_OPEN_DISCONNECTING_TIMEOUT);
}
int32_t P2pLinkDevInit(void)
NO_SANITIZE("cfi") int32_t P2pLinkDevInit(void)
{
ListInit(&g_connectingDevices);
ListInit(&g_connectedDevices);
@ -525,7 +525,7 @@ int32_t P2pLinkDevInit(void)
return SOFTBUS_OK;
}
void P2pLinkDevClean(void)
NO_SANITIZE("cfi") void P2pLinkDevClean(void)
{
P2pLinkCleanConnedDev();
P2pLinkCleanConningDev();

View File

@ -533,7 +533,7 @@ int32_t P2pLinkMagicInit(void)
return SOFTBUS_OK;
}
void P2pLinkClean(void)
NO_SANITIZE("cfi") void P2pLinkClean(void)
{
#define CLEAN_DELAY_100MS 100000
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "p2p clean.");

View File

@ -98,7 +98,7 @@ NO_SANITIZE("cfi") void AddNewPidItem(int32_t pid, const char* mac)
AddNewMacItem(&pItem->macList, mac);
}
void P2pLinkAddPidMacRef(int32_t pid, const char *mac)
NO_SANITIZE("cfi") void P2pLinkAddPidMacRef(int32_t pid, const char *mac)
{
RefPidItem *pItem = NULL;
RefMacItem *mItem = NULL;
@ -117,7 +117,7 @@ void P2pLinkAddPidMacRef(int32_t pid, const char *mac)
}
}
void P2pLinkDelPidRef(int32_t pid)
NO_SANITIZE("cfi") void P2pLinkDelPidRef(int32_t pid)
{
RefPidItem *pItem = NULL;
RefMacItem *mItem = NULL;
@ -137,7 +137,7 @@ void P2pLinkDelPidRef(int32_t pid)
SoftBusFree(pItem);
}
void P2pLinkDelPidMacRef(int32_t pid, const char *mac)
NO_SANITIZE("cfi") void P2pLinkDelPidMacRef(int32_t pid, const char *mac)
{
RefPidItem *pItem = NULL;
RefMacItem *mItem = NULL;
@ -163,7 +163,7 @@ void P2pLinkDelPidMacRef(int32_t pid, const char *mac)
}
}
int32_t P2pLinGetMacRefCnt(int32_t pid, const char *mac)
NO_SANITIZE("cfi") int32_t P2pLinGetMacRefCnt(int32_t pid, const char *mac)
{
RefPidItem *pItem = NULL;
RefMacItem *mItem = NULL;
@ -179,7 +179,7 @@ int32_t P2pLinGetMacRefCnt(int32_t pid, const char *mac)
return mItem->refCnt;
}
void P2pLinkDelMyP2pRef(void)
NO_SANITIZE("cfi") void P2pLinkDelMyP2pRef(void)
{
if (g_myP2pRef == 0) {
return;
@ -194,12 +194,12 @@ void P2pLinkDelMyP2pRef(void)
}
}
void P2pLinkAddMyP2pRef(void)
NO_SANITIZE("cfi") void P2pLinkAddMyP2pRef(void)
{
g_myP2pRef++;
}
int32_t P2pLinkGetMyP2pRef(void)
NO_SANITIZE("cfi") int32_t P2pLinkGetMyP2pRef(void)
{
return g_myP2pRef;
}
@ -238,7 +238,7 @@ NO_SANITIZE("cfi") void DisConnectByPid(int32_t pid)
P2pLinkDelPidRef(pid);
}
void P2pLinkDumpRef(void)
NO_SANITIZE("cfi") void P2pLinkDumpRef(void)
{
RefPidItem *pItem = NULL;
RefPidItem *pNext = NULL;

View File

@ -21,6 +21,7 @@
#include "securec.h"
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
@ -39,7 +40,8 @@
#define CHANNEL_INVALID (-1)
#define FREQUENCY_INVALID (-1)
int32_t P2plinkChannelListToString(const P2pLink5GList *channelList, char *channelString, int32_t len)
NO_SANITIZE("cfi") int32_t P2plinkChannelListToString(const P2pLink5GList *channelList, char *channelString,
int32_t len)
{
if ((channelList == NULL) || (channelList->num == 0)) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_DBG, "channelList is null.");
@ -246,7 +248,7 @@ static int32_t ChoseChannel5gFreq(const GcInfo *gc, const P2pLink5GList *channel
return FREQUENCY_INVALID;
}
int32_t P2plinkGetGroupGrequency(const GcInfo *gc, const P2pLink5GList *channelList)
NO_SANITIZE("cfi") int32_t P2plinkGetGroupGrequency(const GcInfo *gc, const P2pLink5GList *channelList)
{
if (gc == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "%s:invalid param.", __func__);

View File

@ -33,7 +33,7 @@ static bool IsExistState(const FsmStateMachine *fsm, const FsmState *state)
return false;
}
int32_t P2pLinkFsmInit(FsmStateMachine *fsm)
NO_SANITIZE("cfi") int32_t P2pLinkFsmInit(FsmStateMachine *fsm)
{
if (fsm == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "invalid param");
@ -45,7 +45,7 @@ int32_t P2pLinkFsmInit(FsmStateMachine *fsm)
return SOFTBUS_OK;
}
void P2pLinkFsmDeinit(FsmStateMachine *fsm)
NO_SANITIZE("cfi") void P2pLinkFsmDeinit(FsmStateMachine *fsm)
{
if (fsm == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_DBG, "fsm already deinit.");
@ -58,7 +58,7 @@ void P2pLinkFsmDeinit(FsmStateMachine *fsm)
fsm->currentState = NULL;
}
void P2pLinkFsmAddState(FsmStateMachine *fsm, FsmState *state)
NO_SANITIZE("cfi") void P2pLinkFsmAddState(FsmStateMachine *fsm, FsmState *state)
{
if (fsm == NULL || state == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "invalid param");
@ -73,7 +73,7 @@ void P2pLinkFsmAddState(FsmStateMachine *fsm, FsmState *state)
ListAdd(&fsm->stateList, &state->node);
}
void P2pLinkFsmStart(FsmStateMachine *fsm, FsmState *initialState)
NO_SANITIZE("cfi") void P2pLinkFsmStart(FsmStateMachine *fsm, FsmState *initialState)
{
if (fsm->currentState != NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "unexpected state in start msg process");
@ -87,7 +87,7 @@ void P2pLinkFsmStart(FsmStateMachine *fsm, FsmState *initialState)
}
}
void P2pLinkFsmStop(FsmStateMachine *fsm)
NO_SANITIZE("cfi") void P2pLinkFsmStop(FsmStateMachine *fsm)
{
if (fsm->currentState == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "unexpected state in stop msg process");
@ -96,7 +96,7 @@ void P2pLinkFsmStop(FsmStateMachine *fsm)
fsm->currentState = NULL;
}
void P2pLinkFsmTransactState(FsmStateMachine *fsm, FsmState *state)
NO_SANITIZE("cfi") void P2pLinkFsmTransactState(FsmStateMachine *fsm, FsmState *state)
{
if (fsm == NULL || state == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "invalid param");
@ -133,7 +133,8 @@ NO_SANITIZE("cfi") void P2pLinkFsmMsgProc(const FsmStateMachine *fsm, int32_t ms
}
}
void P2pLinkFsmMsgProcDelay(const FsmStateMachine *fsm, int32_t msgType, void *param, uint64_t delayMs)
NO_SANITIZE("cfi") void P2pLinkFsmMsgProcDelay(const FsmStateMachine *fsm, int32_t msgType, void *param,
uint64_t delayMs)
{
if (fsm->currentState == NULL) {
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_ERROR, "current state is null");
@ -146,7 +147,7 @@ void P2pLinkFsmMsgProcDelay(const FsmStateMachine *fsm, int32_t msgType, void *p
(void)P2pLoopProcDelay(fsm->currentState->process, param, delayMs, msgType);
}
void P2pLinkFsmMsgProcDelayDel(int32_t msgType)
NO_SANITIZE("cfi") void P2pLinkFsmMsgProcDelayDel(int32_t msgType)
{
SoftBusLog(SOFTBUS_LOG_CONN, SOFTBUS_LOG_INFO, "delete delay msg type %d", msgType);
(void)P2pLoopProcDelayDel(NULL, msgType);

View File

@ -1304,7 +1304,7 @@ static int32_t ReplyPassiveNonBroadcast(void)
return SOFTBUS_OK;
}
static int32_t MessageRemovePredicate(const SoftBusMessage *msg, void *args)
NO_SANITIZE("cfi") static int32_t MessageRemovePredicate(const SoftBusMessage *msg, void *args)
{
DLOGI("enter");
uintptr_t key = (uintptr_t)args;

View File

@ -19,6 +19,7 @@
#include "bus_center_manager.h"
#include "lnn_lane_interface.h"
#include "softbus_conn_interface.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_proxychannel_callback.h"
@ -78,7 +79,7 @@ static int32_t NotifyNormalChannelOpened(int32_t channelId, const AppInfo *appIn
return ret;
}
int32_t OnProxyChannelOpened(int32_t channelId, const AppInfo *appInfo, unsigned char isServer)
NO_SANITIZE("cfi") int32_t OnProxyChannelOpened(int32_t channelId, const AppInfo *appInfo, unsigned char isServer)
{
int32_t ret = SOFTBUS_ERR;
if (appInfo == NULL) {
@ -104,7 +105,7 @@ int32_t OnProxyChannelOpened(int32_t channelId, const AppInfo *appInfo, unsigned
return ret;
}
int32_t OnProxyChannelOpenFailed(int32_t channelId, const AppInfo *appInfo, int32_t errCode)
NO_SANITIZE("cfi") int32_t OnProxyChannelOpenFailed(int32_t channelId, const AppInfo *appInfo, int32_t errCode)
{
if (appInfo == NULL) {
return SOFTBUS_INVALID_PARAM;
@ -128,7 +129,7 @@ int32_t OnProxyChannelOpenFailed(int32_t channelId, const AppInfo *appInfo, int3
return ret;
}
int32_t OnProxyChannelClosed(int32_t channelId, const AppInfo *appInfo)
NO_SANITIZE("cfi") int32_t OnProxyChannelClosed(int32_t channelId, const AppInfo *appInfo)
{
if (appInfo == NULL) {
return SOFTBUS_INVALID_PARAM;
@ -152,7 +153,8 @@ int32_t OnProxyChannelClosed(int32_t channelId, const AppInfo *appInfo)
return ret;
}
int32_t OnProxyChannelMsgReceived(int32_t channelId, const AppInfo *appInfo, const char *data, uint32_t len)
NO_SANITIZE("cfi") int32_t OnProxyChannelMsgReceived(int32_t channelId, const AppInfo *appInfo, const char *data,
uint32_t len)
{
int32_t ret = SOFTBUS_OK;
if (appInfo == NULL || data == NULL || len == 0) {

View File

@ -16,7 +16,7 @@
#include "softbus_proxychannel_network.h"
#include <securec.h>
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_transmission_interface.h"
@ -39,7 +39,7 @@ NO_SANITIZE("cfi") int32_t NotifyNetworkingChannelOpened(int32_t channelId, cons
return SOFTBUS_OK;
}
void NotifyNetworkingChannelOpenFailed(int32_t channelId, const char *networkId)
NO_SANITIZE("cfi") void NotifyNetworkingChannelOpenFailed(int32_t channelId, const char *networkId)
{
if (g_netChanlistener.onChannelOpenFailed == NULL) {
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "net onChannelOpenFailed is null");
@ -57,7 +57,7 @@ NO_SANITIZE("cfi") void NotifyNetworkingChannelClosed(int32_t channelId)
g_netChanlistener.onChannelClosed(channelId);
}
void NotifyNetworkingMsgReceived(int32_t channelId, const char *data, uint32_t len)
NO_SANITIZE("cfi") void NotifyNetworkingMsgReceived(int32_t channelId, const char *data, uint32_t len)
{
if (g_netChanlistener.onMessageReceived == NULL) {
return;

View File

@ -21,6 +21,7 @@
#include "softbus_adapter_mem.h"
#include "softbus_adapter_socket.h"
#include "softbus_adapter_thread.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_property.h"
@ -90,7 +91,8 @@ void UnPackPacketHead(PacketHead *data)
data->dataLen = (int32_t)SoftBusLtoHl((uint32_t)data->dataLen);
}
int32_t NotifyClientMsgReceived(const char *pkgName, int32_t pid, int32_t channelId, TransReceiveData *receiveData)
NO_SANITIZE("cfi") int32_t NotifyClientMsgReceived(const char *pkgName, int32_t pid, int32_t channelId,
TransReceiveData *receiveData)
{
int32_t ret = TransProxyOnMsgReceived(pkgName, pid, channelId, receiveData);
if (ret != SOFTBUS_OK) {

View File

@ -26,6 +26,7 @@
#include "softbus_adapter_mem.h"
#include "softbus_adapter_thread.h"
#include "softbus_adapter_socket.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_message_open_channel.h"
@ -298,7 +299,7 @@ static int32_t NotifyChannelOpened(int32_t channelId)
return ret;
}
int32_t NotifyChannelOpenFailed(int32_t channelId, int32_t errCode)
NO_SANITIZE("cfi") int32_t NotifyChannelOpenFailed(int32_t channelId, int32_t errCode)
{
SessionConn conn;
if (GetSessionConnById(channelId, &conn) == NULL) {

View File

@ -439,7 +439,8 @@ static void OnAuthChannelClose(int64_t authId)
return;
}
int32_t OpenP2pDirectChannel(const AppInfo *appInfo, const ConnectOption *connInfo, int32_t *channelId)
NO_SANITIZE("cfi") int32_t OpenP2pDirectChannel(const AppInfo *appInfo, const ConnectOption *connInfo,
int32_t *channelId)
{
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "OpenP2pDirectChannel");
if (appInfo == NULL || connInfo == NULL || channelId == NULL || connInfo->type != CONNECT_P2P) {
@ -493,7 +494,7 @@ int32_t OpenP2pDirectChannel(const AppInfo *appInfo, const ConnectOption *connIn
return SOFTBUS_OK;
}
int32_t P2pDirectChannelInit(void)
NO_SANITIZE("cfi") int32_t P2pDirectChannelInit(void)
{
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "P2pDirectChannelInit");
AuthTransListener p2pTransCb = {

View File

@ -20,13 +20,15 @@
#include "auth_interface.h"
#include "lnn_network_manager.h"
#include "softbus_adapter_mem.h"
#include "softbus_def.h"
#include "softbus_errcode.h"
#include "softbus_log.h"
#include "softbus_socket.h"
#include "trans_tcp_direct_message.h"
#include "trans_tcp_direct_sessionconn.h"
int32_t OpenTcpDirectChannel(const AppInfo *appInfo, const ConnectOption *connInfo, int32_t *channelId)
NO_SANITIZE("cfi") int32_t OpenTcpDirectChannel(const AppInfo *appInfo, const ConnectOption *connInfo,
int32_t *channelId)
{
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "OpenTcpDirectChannel");
if (appInfo == NULL || connInfo == NULL || channelId == NULL) {

View File

@ -129,7 +129,7 @@ static int32_t NotifyUdpChannelOpened(const AppInfo *appInfo, bool isServerSide)
appInfo->myData.sessionName, &info);
}
int32_t NotifyUdpChannelClosed(const AppInfo *info)
NO_SANITIZE("cfi") int32_t NotifyUdpChannelClosed(const AppInfo *info)
{
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "notify udp channel closed, pkg[%s].", info->myData.pkgName);
int32_t ret = g_channelCb->OnChannelClosed(info->myData.pkgName, info->myData.pid,
@ -141,7 +141,7 @@ int32_t NotifyUdpChannelClosed(const AppInfo *info)
return SOFTBUS_OK;
}
int32_t NotifyUdpChannelOpenFailed(const AppInfo *info, int32_t errCode)
NO_SANITIZE("cfi") int32_t NotifyUdpChannelOpenFailed(const AppInfo *info, int32_t errCode)
{
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "notify udp channel open failed.");
char pkgName[PKG_NAME_SIZE_MAX] = {0};
@ -166,7 +166,7 @@ int32_t NotifyUdpChannelOpenFailed(const AppInfo *info, int32_t errCode)
return SOFTBUS_OK;
}
int32_t NotifyUdpQosEvent(const AppInfo *info, int32_t eventId, int32_t tvCount, const QosTv *tvList)
NO_SANITIZE("cfi") int32_t NotifyUdpQosEvent(const AppInfo *info, int32_t eventId, int32_t tvCount, const QosTv *tvList)
{
SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "notify udp qos eventId[%d].", eventId);
char pkgName[PKG_NAME_SIZE_MAX] = {0};