diff --git a/frameworks/huks_standard/main/os_dependency/ipc/src/hks_samgr_client_proxy.c b/frameworks/huks_standard/main/os_dependency/ipc/src/hks_samgr_client_proxy.c index 1be18d00dde9d81dd0dc4cb2977b977b0d2c65a1..da25ca07aa841ee947931f1b20bb9af0980e1abe 100755 --- a/frameworks/huks_standard/main/os_dependency/ipc/src/hks_samgr_client_proxy.c +++ b/frameworks/huks_standard/main/os_dependency/ipc/src/hks_samgr_client_proxy.c @@ -26,14 +26,16 @@ volatile bool g_messageRecived = false; volatile int32_t g_result = HKS_ERROR_UNKNOWN_ERROR; volatile int32_t g_sleepTimeout = SLEEP_SECOND_TIMEOUT; -static void UpdaeGlobalStatus(uint32_t outBlobSize, bool messageRecived, int32_t result, int32_t sleepTime) { +static void UpdaeGlobalStatus(uint32_t outBlobSize, bool messageRecived, int32_t result, int32_t sleepTime) +{ g_outBlob.size = outBlobSize; g_result = result; - g_sleepTimeout= sleepTime; + g_sleepTimeout = sleepTime; g_messageRecived = messageRecived; } -static int32_t SynchronizeOutput(struct HksBlob *outBlob) { +static int32_t SynchronizeOutput(struct HksBlob *outBlob) +{ while (!g_messageRecived) { g_sleepTimeout -= SLEEP_SECOND_TIME; usleep(SLEEP_SECOND_TIME); @@ -99,7 +101,6 @@ static int CurrentCallback(IOwner owner, int code, IpcIo *reply) g_outBlob.data = dataBuf; UpdaeGlobalStatus(len, true, g_result, SLEEP_SECOND_TIMEOUT); return HKS_SUCCESS; - } static int32_t IpcAsyncCall(IUnknown *iUnknown, enum HksMessage type, const struct HksBlob *inBlob, @@ -163,16 +164,18 @@ void HKS_DestroyClient(const char *service, const char *feature, void *iproxy) free(iproxy); } -int32_t HksSamgrInitialize(void) { +int32_t HksSamgrInitialize(void) +{ int32_t ret = SAMGR_RegisterFectory(HKS_SAMGR_SERVICE, HKS_SAMGR_FEATRURE, HKS_CreatClient, HKS_DestroyClient); if (ret != HKS_SUCCESS) { - return HKS_FAILURE; + return HKS_FAILURE; } SAMGR_Bootstrap(); return HKS_SUCCESS; } -static int32_t HksSendRequestSync(enum HksMessage type, const struct HksBlob *inBlob, struct HksBlob *outBlob) { +static int32_t HksSendRequestSync(enum HksMessage type, const struct HksBlob *inBlob, struct HksBlob *outBlob) +{ HksMgrClientApi *clientProxy; IUnknown *iUnknown = SAMGR_GetInstance()->GetFeatureApi(HKS_SAMGR_SERVICE, HKS_SAMGR_FEATRURE); if (iUnknown == NULL) { diff --git a/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/hks_samgr_server.h b/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/hks_samgr_server.h index 920afa0d333840b612a0b0554705033b816bcdf0..b85866e7b002c1180b4fa6a062aff937830bcb56 100755 --- a/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/hks_samgr_server.h +++ b/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/hks_samgr_server.h @@ -17,6 +17,7 @@ #define HKS_SAMGR_SERVER_H #include + #include #include "iproxy_server.h" diff --git a/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/service_pro_main.c b/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/service_pro_main.c index ce0f5ac4937a8d802eaf97681f5da4ba0c4d67be..bdfa48feb02a4aa5100bb311212c94d2d3cf4ca8 100755 --- a/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/service_pro_main.c +++ b/services/huks_standard/huks_service/main/os_dependency/sa/sa_mgr/service_pro_main.c @@ -14,6 +14,7 @@ */ #include + #include "samgr_lite.h" void __attribute__((weak)) OHOS_SystemInit(void)