From 1635ba03eb5f5e9ee1c5253cca9c7e63271e8736 Mon Sep 17 00:00:00 2001 From: huyx Date: Wed, 24 Jul 2024 18:02:30 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=B6=85=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- adapter/uhdf2/manager/src/devsvc_manager_stub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/adapter/uhdf2/manager/src/devsvc_manager_stub.c b/adapter/uhdf2/manager/src/devsvc_manager_stub.c index 42c11b4fa..64a220ff4 100644 --- a/adapter/uhdf2/manager/src/devsvc_manager_stub.c +++ b/adapter/uhdf2/manager/src/devsvc_manager_stub.c @@ -353,7 +353,6 @@ static int32_t DevSvcManagerStubGetService(struct IDevSvcManager *super, struct if (remoteService != NULL) { HdfSbufWriteRemoteService(reply, remoteService); ret = HDF_SUCCESS; - HDF_LOGI("StubGetService service %{public}s found", name); } else { HDF_LOGE("StubGetService %{public}s remoteService is null", name); ret = HDF_FAILURE; -- Gitee From 7df306b50d11e59bc9738b3a6c47ac61f1d197b2 Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 16:29:35 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- adapter/uhdf2/manager/src/devsvc_manager_stub.c | 1 + interfaces/inner_api/core/hdf_device_class.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adapter/uhdf2/manager/src/devsvc_manager_stub.c b/adapter/uhdf2/manager/src/devsvc_manager_stub.c index 64a220ff4..6bab82f2f 100644 --- a/adapter/uhdf2/manager/src/devsvc_manager_stub.c +++ b/adapter/uhdf2/manager/src/devsvc_manager_stub.c @@ -353,6 +353,7 @@ static int32_t DevSvcManagerStubGetService(struct IDevSvcManager *super, struct if (remoteService != NULL) { HdfSbufWriteRemoteService(reply, remoteService); ret = HDF_SUCCESS; + HDF_LOGD("StubGetService service %{public}s found", name); } else { HDF_LOGE("StubGetService %{public}s remoteService is null", name); ret = HDF_FAILURE; diff --git a/interfaces/inner_api/core/hdf_device_class.h b/interfaces/inner_api/core/hdf_device_class.h index 46edd3d37..c0f4068df 100644 --- a/interfaces/inner_api/core/hdf_device_class.h +++ b/interfaces/inner_api/core/hdf_device_class.h @@ -42,7 +42,7 @@ typedef enum { DEVICE_CLASS_CAMERA = 0x1 << 6, /** Camera device */ DEVICE_CLASS_USB = 0x1 << 7, /** USB device */ DEVICE_CLASS_USERAUTH = 0x1 << 8, /** User authentication device */ - DEVICE_CLASS_HIMEDIACOMM = 0X1 << 9, /** Mediacomm device */ + DEVICE_CLASS_HIMEDIACOMM = 0x1 << 9, /** Mediacomm device */ DEVICE_CLASS_MAX = 0x1 << 10, /** Maximum value of the device class */ } DeviceClass; -- Gitee From 6e8aaff88ef06bf92063baf6c7707d745224b02f Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 16:30:26 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- adapter/uhdf2/manager/src/devsvc_manager_stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/uhdf2/manager/src/devsvc_manager_stub.c b/adapter/uhdf2/manager/src/devsvc_manager_stub.c index 6bab82f2f..075fc8622 100644 --- a/adapter/uhdf2/manager/src/devsvc_manager_stub.c +++ b/adapter/uhdf2/manager/src/devsvc_manager_stub.c @@ -481,7 +481,7 @@ static int32_t DevSvcManagerStubRegisterServListener(struct IDevSvcManager *supe if (ret != HDF_SUCCESS) { ServStatListenerHolderRelease(listenerHolder); } else { - HDF_LOGI("register servstat listener success"); + HDF_LOGD("register servstat listener success"); } return HDF_SUCCESS; -- Gitee From 085bc96ca8409d068ef8da7d7780726e9f45d591 Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 20:44:28 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- .vscode/settings.json | 6 ++++++ adapter/uhdf2/manager/src/servstat_listener_holder.c | 6 ++++-- framework/core/manager/src/devsvc_manager.c | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..197d24c8a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "devsvc_listener_holder.h": "c", + "hdf_remote_service.h": "c" + } +} \ No newline at end of file diff --git a/adapter/uhdf2/manager/src/servstat_listener_holder.c b/adapter/uhdf2/manager/src/servstat_listener_holder.c index 09662398a..77a74c73c 100644 --- a/adapter/uhdf2/manager/src/servstat_listener_holder.c +++ b/adapter/uhdf2/manager/src/servstat_listener_holder.c @@ -63,7 +63,7 @@ static void UServStatListenerHolderListListAdd(struct UServStatListenerHolder *h } int32_t UServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holder, - struct ServiceStatus *status) + struct ServiceStatus *status, bool flag) { if (holder == NULL || status == NULL) { return HDF_ERR_INVALID_PARAM; @@ -73,7 +73,9 @@ int32_t UServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holde HDF_LOGE("failed to notify service status, invalid holder"); return HDF_ERR_INVALID_PARAM; } - HDF_LOGI("notify service status %{public}s, %{public}d", status->serviceName, status->status); + if (flag == true) { + HDF_LOGI("notify service status %{public}s, %{public}d", status->serviceName, status->status); + } struct HdfSBuf *data = HdfSbufTypedObtain(SBUF_IPC); if (data == NULL) { HDF_LOGE("failed to notify service status, oom"); diff --git a/framework/core/manager/src/devsvc_manager.c b/framework/core/manager/src/devsvc_manager.c index 4d5ec55f1..91718c0c8 100644 --- a/framework/core/manager/src/devsvc_manager.c +++ b/framework/core/manager/src/devsvc_manager.c @@ -122,7 +122,7 @@ int DevSvcManagerAddService(struct IDevSvcManager *inst, } OsalMutexLock(&devSvcManager->mutex); DListInsertTail(&record->entry, &devSvcManager->services); - NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_START); + NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_START, false); OsalMutexUnlock(&devSvcManager->mutex); return HDF_SUCCESS; } @@ -157,7 +157,7 @@ int DevSvcManagerUpdateService(struct IDevSvcManager *inst, record->value = service; record->devClass = servInfo->devClass; record->devId = servInfo->devId; - NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_CHANGE); + NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_CHANGE, true); OsalMutexUnlock(&devSvcManager->mutex); return HDF_SUCCESS; } @@ -198,7 +198,7 @@ void DevSvcManagerRemoveService(struct IDevSvcManager *inst, const char *svcName return; } if (devObj == NULL || (uintptr_t)devObj == (uintptr_t)serviceRecord->value) { - NotifyServiceStatusLocked(devSvcManager, serviceRecord, SERVIE_STATUS_STOP); + NotifyServiceStatusLocked(devSvcManager, serviceRecord, SERVIE_STATUS_STOP, true); DListRemove(&serviceRecord->entry); removeFlag = true; } -- Gitee From 1c459d15b3823cbbbaee3ec1707882c8dcac7663 Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 20:46:30 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/core/manager/src/devsvc_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/core/manager/src/devsvc_manager.c b/framework/core/manager/src/devsvc_manager.c index 91718c0c8..73e6af461 100644 --- a/framework/core/manager/src/devsvc_manager.c +++ b/framework/core/manager/src/devsvc_manager.c @@ -39,7 +39,7 @@ static struct DevSvcRecord *DevSvcManagerSearchServiceLocked(struct IDevSvcManag } static void NotifyServiceStatusLocked( - struct DevSvcManager *devSvcManager, const struct DevSvcRecord *record, uint32_t status) + struct DevSvcManager *devSvcManager, const struct DevSvcRecord *record, uint32_t status, bool flag) { struct ServStatListenerHolder *holder = NULL; struct ServStatListenerHolder *tmp = NULL; @@ -51,7 +51,7 @@ static void NotifyServiceStatusLocked( }; DLIST_FOR_EACH_ENTRY_SAFE(holder, tmp, &devSvcManager->svcstatListeners, struct ServStatListenerHolder, node) { if ((holder->listenClass & record->devClass) && holder->NotifyStatus != NULL) { - if (holder->NotifyStatus(holder, &svcstat) == HDF_FAILURE) { + if (holder->NotifyStatus(holder, &svcstat, flag) == HDF_FAILURE) { DListRemove(&holder->node); if (holder->Recycle != NULL) { holder->Recycle(holder); -- Gitee From 2f74d52a74a8bf673042a5e8fcb938b525931cd1 Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 20:49:07 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/core/manager/src/devsvc_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/manager/src/devsvc_manager.c b/framework/core/manager/src/devsvc_manager.c index 73e6af461..d7b01319e 100644 --- a/framework/core/manager/src/devsvc_manager.c +++ b/framework/core/manager/src/devsvc_manager.c @@ -76,7 +76,7 @@ static void NotifyServiceStatusOnRegisterLocked( .info = record->servInfo, }; if (listenerHolder->NotifyStatus != NULL) { - listenerHolder->NotifyStatus(listenerHolder, &svcstat); + listenerHolder->NotifyStatus(listenerHolder, &svcstat, true); } } } -- Gitee From 8a165a112ee0a5328253b5d0f0f1bdb63ef096c1 Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 21:40:26 +0800 Subject: [PATCH 07/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- .vscode/settings.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 197d24c8a..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "files.associations": { - "devsvc_listener_holder.h": "c", - "hdf_remote_service.h": "c" - } -} \ No newline at end of file -- Gitee From d817f428825684e5c81a88b57618c7a85e87d73e Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 21:56:53 +0800 Subject: [PATCH 08/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/core/manager/include/devsvc_listener_holder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/manager/include/devsvc_listener_holder.h b/framework/core/manager/include/devsvc_listener_holder.h index d2557a283..bee41d0a4 100644 --- a/framework/core/manager/include/devsvc_listener_holder.h +++ b/framework/core/manager/include/devsvc_listener_holder.h @@ -16,7 +16,7 @@ struct ServStatListenerHolder { uint16_t listenClass; struct DListHead node; uint64_t index; - int32_t (*NotifyStatus)(struct ServStatListenerHolder *holder, struct ServiceStatus *status); + int32_t (*NotifyStatus)(struct ServStatListenerHolder *holder, struct ServiceStatus *status, bool flag); void (*Recycle)(struct ServStatListenerHolder *holder); }; -- Gitee From fcec7bbfcdb0e23d258924ba506bcddb4aaa13dc Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 22:33:18 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- .vscode/settings.json | 5 +++++ framework/core/manager/src/servstat_listener_holder.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..6a889c4de --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "hdf_device_desc.h": "c" + } +} \ No newline at end of file diff --git a/framework/core/manager/src/servstat_listener_holder.c b/framework/core/manager/src/servstat_listener_holder.c index b73ebbff5..f6d93e0c1 100644 --- a/framework/core/manager/src/servstat_listener_holder.c +++ b/framework/core/manager/src/servstat_listener_holder.c @@ -37,7 +37,7 @@ void ServStatListenerHolderinit(void) } int32_t KServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holder, - struct ServiceStatus *status) + struct ServiceStatus *status, bool flag) { if (holder == NULL || status == NULL) { return HDF_ERR_INVALID_PARAM; -- Gitee From 9f183872b19311445101168f09ad0553c3468cd4 Mon Sep 17 00:00:00 2001 From: huyx Date: Thu, 25 Jul 2024 22:34:01 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 6a889c4de..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files.associations": { - "hdf_device_desc.h": "c" - } -} \ No newline at end of file -- Gitee From c92a757f8e7e1410fc5e262d7a73f5f6da962b2c Mon Sep 17 00:00:00 2001 From: huyx Date: Fri, 26 Jul 2024 09:52:36 +0800 Subject: [PATCH 11/14] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/core/manager/src/devsvc_manager.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/framework/core/manager/src/devsvc_manager.c b/framework/core/manager/src/devsvc_manager.c index d7b01319e..fecd40baa 100644 --- a/framework/core/manager/src/devsvc_manager.c +++ b/framework/core/manager/src/devsvc_manager.c @@ -39,7 +39,7 @@ static struct DevSvcRecord *DevSvcManagerSearchServiceLocked(struct IDevSvcManag } static void NotifyServiceStatusLocked( - struct DevSvcManager *devSvcManager, const struct DevSvcRecord *record, uint32_t status, bool flag) + struct DevSvcManager *devSvcManager, const struct DevSvcRecord *record, uint32_t status) { struct ServStatListenerHolder *holder = NULL; struct ServStatListenerHolder *tmp = NULL; @@ -51,7 +51,7 @@ static void NotifyServiceStatusLocked( }; DLIST_FOR_EACH_ENTRY_SAFE(holder, tmp, &devSvcManager->svcstatListeners, struct ServStatListenerHolder, node) { if ((holder->listenClass & record->devClass) && holder->NotifyStatus != NULL) { - if (holder->NotifyStatus(holder, &svcstat, flag) == HDF_FAILURE) { + if (holder->NotifyStatus(holder, &svcstat, true) == HDF_FAILURE) { DListRemove(&holder->node); if (holder->Recycle != NULL) { holder->Recycle(holder); @@ -76,7 +76,7 @@ static void NotifyServiceStatusOnRegisterLocked( .info = record->servInfo, }; if (listenerHolder->NotifyStatus != NULL) { - listenerHolder->NotifyStatus(listenerHolder, &svcstat, true); + listenerHolder->NotifyStatus(listenerHolder, &svcstat, false); } } } @@ -122,7 +122,7 @@ int DevSvcManagerAddService(struct IDevSvcManager *inst, } OsalMutexLock(&devSvcManager->mutex); DListInsertTail(&record->entry, &devSvcManager->services); - NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_START, false); + NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_START); OsalMutexUnlock(&devSvcManager->mutex); return HDF_SUCCESS; } @@ -157,7 +157,7 @@ int DevSvcManagerUpdateService(struct IDevSvcManager *inst, record->value = service; record->devClass = servInfo->devClass; record->devId = servInfo->devId; - NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_CHANGE, true); + NotifyServiceStatusLocked(devSvcManager, record, SERVIE_STATUS_CHANGE); OsalMutexUnlock(&devSvcManager->mutex); return HDF_SUCCESS; } @@ -198,7 +198,7 @@ void DevSvcManagerRemoveService(struct IDevSvcManager *inst, const char *svcName return; } if (devObj == NULL || (uintptr_t)devObj == (uintptr_t)serviceRecord->value) { - NotifyServiceStatusLocked(devSvcManager, serviceRecord, SERVIE_STATUS_STOP, true); + NotifyServiceStatusLocked(devSvcManager, serviceRecord, SERVIE_STATUS_STOP); DListRemove(&serviceRecord->entry); removeFlag = true; } -- Gitee From 81cf5dc2fae8df032748e2ad139eba342f42e022 Mon Sep 17 00:00:00 2001 From: huyx Date: Fri, 26 Jul 2024 10:22:55 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- .vscode/settings.json | 6 ++++++ adapter/uhdf2/manager/src/devsvc_manager_stub.c | 2 +- adapter/uhdf2/manager/src/servstat_listener_holder.c | 2 +- framework/core/manager/src/servstat_listener_holder.c | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..197d24c8a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "devsvc_listener_holder.h": "c", + "hdf_remote_service.h": "c" + } +} \ No newline at end of file diff --git a/adapter/uhdf2/manager/src/devsvc_manager_stub.c b/adapter/uhdf2/manager/src/devsvc_manager_stub.c index 075fc8622..9ed2cd7d9 100644 --- a/adapter/uhdf2/manager/src/devsvc_manager_stub.c +++ b/adapter/uhdf2/manager/src/devsvc_manager_stub.c @@ -481,7 +481,7 @@ static int32_t DevSvcManagerStubRegisterServListener(struct IDevSvcManager *supe if (ret != HDF_SUCCESS) { ServStatListenerHolderRelease(listenerHolder); } else { - HDF_LOGD("register servstat listener success"); + HDF_LOGI("register servstat listener success, pid = %{public}d", HdfRemoteGetCallingPid()); } return HDF_SUCCESS; diff --git a/adapter/uhdf2/manager/src/servstat_listener_holder.c b/adapter/uhdf2/manager/src/servstat_listener_holder.c index 77a74c73c..7fa8834ac 100644 --- a/adapter/uhdf2/manager/src/servstat_listener_holder.c +++ b/adapter/uhdf2/manager/src/servstat_listener_holder.c @@ -73,7 +73,7 @@ int32_t UServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holde HDF_LOGE("failed to notify service status, invalid holder"); return HDF_ERR_INVALID_PARAM; } - if (flag == true) { + if (flag) { HDF_LOGI("notify service status %{public}s, %{public}d", status->serviceName, status->status); } struct HdfSBuf *data = HdfSbufTypedObtain(SBUF_IPC); diff --git a/framework/core/manager/src/servstat_listener_holder.c b/framework/core/manager/src/servstat_listener_holder.c index f6d93e0c1..d38190a36 100644 --- a/framework/core/manager/src/servstat_listener_holder.c +++ b/framework/core/manager/src/servstat_listener_holder.c @@ -39,6 +39,7 @@ void ServStatListenerHolderinit(void) int32_t KServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holder, struct ServiceStatus *status, bool flag) { + (void)flag; if (holder == NULL || status == NULL) { return HDF_ERR_INVALID_PARAM; } -- Gitee From 48ca5ff14e5c182d292efba30474684d0e3704b3 Mon Sep 17 00:00:00 2001 From: huyx Date: Fri, 26 Jul 2024 10:24:53 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- .vscode/settings.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 197d24c8a..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "files.associations": { - "devsvc_listener_holder.h": "c", - "hdf_remote_service.h": "c" - } -} \ No newline at end of file -- Gitee From 7929e468646a9801885db743c371b1a91e525595 Mon Sep 17 00:00:00 2001 From: huyx Date: Fri, 26 Jul 2024 11:38:14 +0800 Subject: [PATCH 14/14] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- adapter/uhdf2/manager/src/servstat_listener_holder.c | 4 ++-- framework/core/manager/include/devsvc_listener_holder.h | 2 +- framework/core/manager/src/servstat_listener_holder.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/adapter/uhdf2/manager/src/servstat_listener_holder.c b/adapter/uhdf2/manager/src/servstat_listener_holder.c index 7fa8834ac..616030fbc 100644 --- a/adapter/uhdf2/manager/src/servstat_listener_holder.c +++ b/adapter/uhdf2/manager/src/servstat_listener_holder.c @@ -63,7 +63,7 @@ static void UServStatListenerHolderListListAdd(struct UServStatListenerHolder *h } int32_t UServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holder, - struct ServiceStatus *status, bool flag) + struct ServiceStatus *status, bool isPrintLog) { if (holder == NULL || status == NULL) { return HDF_ERR_INVALID_PARAM; @@ -73,7 +73,7 @@ int32_t UServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holde HDF_LOGE("failed to notify service status, invalid holder"); return HDF_ERR_INVALID_PARAM; } - if (flag) { + if (isPrintLog) { HDF_LOGI("notify service status %{public}s, %{public}d", status->serviceName, status->status); } struct HdfSBuf *data = HdfSbufTypedObtain(SBUF_IPC); diff --git a/framework/core/manager/include/devsvc_listener_holder.h b/framework/core/manager/include/devsvc_listener_holder.h index bee41d0a4..9a4d61b48 100644 --- a/framework/core/manager/include/devsvc_listener_holder.h +++ b/framework/core/manager/include/devsvc_listener_holder.h @@ -16,7 +16,7 @@ struct ServStatListenerHolder { uint16_t listenClass; struct DListHead node; uint64_t index; - int32_t (*NotifyStatus)(struct ServStatListenerHolder *holder, struct ServiceStatus *status, bool flag); + int32_t (*NotifyStatus)(struct ServStatListenerHolder *holder, struct ServiceStatus *status, bool isPrintLog); void (*Recycle)(struct ServStatListenerHolder *holder); }; diff --git a/framework/core/manager/src/servstat_listener_holder.c b/framework/core/manager/src/servstat_listener_holder.c index d38190a36..13d861088 100644 --- a/framework/core/manager/src/servstat_listener_holder.c +++ b/framework/core/manager/src/servstat_listener_holder.c @@ -37,9 +37,9 @@ void ServStatListenerHolderinit(void) } int32_t KServStatListenerHolderNotifyStatus(struct ServStatListenerHolder *holder, - struct ServiceStatus *status, bool flag) + struct ServiceStatus *status, bool isPrintLog) { - (void)flag; + (void)isPrintLog; if (holder == NULL || status == NULL) { return HDF_ERR_INVALID_PARAM; } -- Gitee