optimize logs

Signed-off-by: ye-xiaokang123 <yexiaokang3@huawei.com>
This commit is contained in:
ye-xiaokang123
2025-11-03 17:12:02 +08:00
committed by Agrant
parent bfa5a5434b
commit d8541a4df8
3 changed files with 6 additions and 8 deletions
+4 -4
View File
@@ -1117,7 +1117,7 @@ static void NSTACKX_PostEventBlockHander(void *argument)
}
if (arg->sem != NULL) {
SemPost(&(arg->sem->wait));
DFINDER_LOGI(TAG, "post event is done");
DFINDER_LOGD(TAG, "post event is done");
}
if (arg->cb != NULL) {
arg->cb(arg->arg);
@@ -1161,7 +1161,7 @@ static int32_t NSTACKX_BlockEvtWaitFinish(struct PostEvtBlockArgs *arg, struct N
if (ret != NSTACKX_EOK) {
DFINDER_LOGE(TAG, "sem wait failed errno %d", GetErrno());
} else {
DFINDER_LOGI(TAG, "sem wait success");
DFINDER_LOGD(TAG, "sem wait success");
}
return ret;
@@ -1191,7 +1191,7 @@ static void NSTACKX_FreeSem(void *arg)
struct NSTACKX_Sem *sem = (struct NSTACKX_Sem *)arg;
SemDestroy(&sem->wait);
free(sem);
DFINDER_LOGI(TAG, "free sem end");
DFINDER_LOGD(TAG, "free sem end");
}
static int32_t NSTACKX_PostEventBlock(EventHandle handle, void *arg, FreeArg cb)
@@ -1240,7 +1240,7 @@ static int32_t NSTACKX_PostEventBlock(EventHandle handle, void *arg, FreeArg cb)
return NSTACKX_EFAILED;
}
NSTACKX_FreeSem((void *)sem);
DFINDER_LOGI(TAG, "post event success");
DFINDER_LOGD(TAG, "post event success");
return NSTACKX_EOK;
}
+1 -3
View File
@@ -669,7 +669,6 @@ static int32_t UpdateLocalDeviceServiceDataV2(uint8_t af, const struct NSTACKX_S
if (iface != NULL) {
(void)memcpy_s(iface->serviceData, NSTACKX_MAX_SERVICE_DATA_LEN,
data->serviceData, NSTACKX_MAX_SERVICE_DATA_LEN);
DFINDER_LOGI(TAG, "set service data sucess");
return NSTACKX_EOK;
}
@@ -678,7 +677,6 @@ static int32_t UpdateLocalDeviceServiceDataV2(uint8_t af, const struct NSTACKX_S
if (iface != NULL) {
(void)memcpy_s(iface->serviceData, NSTACKX_MAX_SERVICE_DATA_LEN,
data->serviceData, NSTACKX_MAX_SERVICE_DATA_LEN);
DFINDER_LOGI(TAG, "set service data sucess");
return NSTACKX_EOK;
}
}
@@ -699,7 +697,7 @@ int32_t SetLocalDeviceServiceDataV2(const struct NSTACKX_ServiceData *param, uin
union InetAddr addr;
uint8_t af = InetGetAfType(param[i].ip, &addr);
if (UpdateLocalDeviceServiceDataV2(af, &(param[i])) == NSTACKX_EOK) {
DFINDER_LOGI(TAG, "update local device serviceData by param[%u]", i);
DFINDER_LOGD(TAG, "update local device serviceData by param[%u]", i);
ret = NSTACKX_EOK;
}
}
+1 -1
View File
@@ -450,7 +450,7 @@ static void UpdatedByTimeout(RxIface *rxIface, int8_t *updated)
if (*updated == NSTACKX_TRUE) {
return;
}
uint32_t diffMs = GetTimeDiffMs(&preTime, &(rxIface->updateTime));
uint32_t diffMs = GetTimeDiffMs(&(rxIface->updateTime), &preTime);
uint32_t timeoutMs = GetNotifyTimeoutMs();
if (timeoutMs != 0 && diffMs > timeoutMs) {
*updated = NSTACKX_TRUE;