From bfbc742a3af1ac1d230498ae15c9cbd9c29254d5 Mon Sep 17 00:00:00 2001 From: j30052480 Date: Thu, 16 May 2024 16:13:36 +0800 Subject: [PATCH] feat: add delay before devmgr kill host Signed-off-by: j30052480 --- adapter/uhdf2/manager/src/driver_installer_full.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adapter/uhdf2/manager/src/driver_installer_full.c b/adapter/uhdf2/manager/src/driver_installer_full.c index 6778367ed..010cf9c15 100644 --- a/adapter/uhdf2/manager/src/driver_installer_full.c +++ b/adapter/uhdf2/manager/src/driver_installer_full.c @@ -19,6 +19,7 @@ #include "hdf_log.h" #include "osal_mem.h" #include "service_control.h" +#include "osal_time.h" #define HDF_LOG_TAG driver_installer_full #define MAX_CMD_LEN 256 @@ -35,9 +36,11 @@ int DriverInstallerFullStartDeviceHost(uint32_t devHostId, const char* devHostNa return HDF_SUCCESS; } +#define WAIT_DFX_SLEEP_TIME 1000 // ms int DriverInstallerFullStopDeviceHost(uint32_t devHostId, const char* devHostName) { int ret; + OsalMSleep(WAIT_DFX_SLEEP_TIME); // wait dfx catch faultlog ret = ServiceControlWithExtra(devHostName, STOP, NULL, 0); HDF_LOGI("%{public}s %{public}s %{public}d %{public}d", __func__, devHostName, devHostId, ret); return ret; -- Gitee