!47 修复beta2.2告警

Merge pull request !47 from caochao/cherry-pick-1643507903
This commit is contained in:
openharmony_ci 2022-01-30 03:01:32 +00:00 committed by Gitee
commit e2460f45fd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 15 additions and 16 deletions

View File

@ -125,7 +125,7 @@ uint32 *SAMGR_SendSharedRequest(const Identity *identity, const Request *request
exchange.id.queueId = NULL; exchange.id.queueId = NULL;
int32 err = SharedSend(identity->queueId, &exchange, 0); int32 err = SharedSend(identity->queueId, &exchange, 0);
if (err != EC_SUCCESS) { if (err != EC_SUCCESS) {
HILOG_ERROR(HILOG_MODULE_SAMGR, "SharedSend [%p] failed(%d)!", identity->queueId, err); HILOG_ERROR(HILOG_MODULE_SAMGR, "SharedSend failed(%d)!", err);
(void)FreeReference(&exchange); (void)FreeReference(&exchange);
} }
return exchange.sharedRef; return exchange.sharedRef;
@ -154,7 +154,7 @@ int32 SAMGR_SendSharedDirectRequest(const Identity *id, const Request *req, cons
exchange.id.queueId = NULL; exchange.id.queueId = NULL;
int32 err = SharedSend(id->queueId, &exchange, 0); int32 err = SharedSend(id->queueId, &exchange, 0);
if (err != EC_SUCCESS) { if (err != EC_SUCCESS) {
HILOG_ERROR(HILOG_MODULE_SAMGR, "SharedSend [%p] failed(%d)!", id->queueId, err); HILOG_ERROR(HILOG_MODULE_SAMGR, "SharedSend failed(%d)!", err);
(void)FreeReference(&exchange); (void)FreeReference(&exchange);
} }
*ref = exchange.sharedRef; *ref = exchange.sharedRef;

View File

@ -193,7 +193,7 @@ static void InitializeAllServices(Vector *services)
const char *name = serviceImpl->service->GetName(serviceImpl->service); const char *name = serviceImpl->service->GetName(serviceImpl->service);
AddTaskPool(serviceImpl, &config, name); AddTaskPool(serviceImpl, &config, name);
HILOG_INFO(HILOG_MODULE_SAMGR, "Init service:%s TaskPool:%p", name, serviceImpl->taskPool); HILOG_INFO(HILOG_MODULE_SAMGR, "Init service:%s", name);
InitializeSingleService(serviceImpl); InitializeSingleService(serviceImpl);
} }
SamgrLiteImpl *samgr = GetImplement(); SamgrLiteImpl *samgr = GetImplement();
@ -446,7 +446,7 @@ static void AddTaskPool(ServiceImpl *service, TaskConfig *cfg, const char *name)
} }
service->taskPool = samgr->sharedPool[pos]; service->taskPool = samgr->sharedPool[pos];
if (SAMGR_ReferenceTaskPool(service->taskPool) == NULL) { if (SAMGR_ReferenceTaskPool(service->taskPool) == NULL) {
HILOG_ERROR(HILOG_MODULE_SAMGR, "shared task:%p pri:%d ref is full", service->taskPool, cfg->priority); HILOG_ERROR(HILOG_MODULE_SAMGR, "pri:%d ref is full", cfg->priority);
samgr->sharedPool[pos] = NULL; samgr->sharedPool[pos] = NULL;
} }
} }
@ -500,8 +500,8 @@ static void HandleInitRequest(const Request *request, const Response *response)
{ {
ServiceImpl *serviceImpl = (ServiceImpl *)request->data; ServiceImpl *serviceImpl = (ServiceImpl *)request->data;
if (serviceImpl == NULL) { if (serviceImpl == NULL) {
HILOG_ERROR(HILOG_MODULE_SAMGR, "Init service Request:<%d,%d>, Response:<%p,%d>!", HILOG_ERROR(HILOG_MODULE_SAMGR, "Init service Request:<%d,%d>, Response:<%d>!",
request->msgId, request->msgValue, response->data, response->len); request->msgId, request->msgValue, response->len);
return; return;
} }
uint32 lastTime = serviceImpl->ops.timestamp; uint32 lastTime = serviceImpl->ops.timestamp;

View File

@ -77,8 +77,7 @@ IUnknown *SAMGR_FindServiceApi(const char *service, const char *feature)
} }
VECTOR_Add(&g_remoteRegister.clients, proxy); VECTOR_Add(&g_remoteRegister.clients, proxy);
MUTEX_Unlock(g_remoteRegister.mtx); MUTEX_Unlock(g_remoteRegister.mtx);
HILOG_INFO(HILOG_MODULE_SAMGR, "Create remote sa proxy[%p]<%s, %s>!", HILOG_INFO(HILOG_MODULE_SAMGR, "Create remote sa proxy<%s, %s>!", service, feature);
proxy, service, feature);
return proxy; return proxy;
} }

View File

@ -123,8 +123,8 @@ int SAMGR_AddRouter(Endpoint *endpoint, const SaName *saName, const Identity *id
Router *router = SAMGR_Malloc(sizeof(Router)); Router *router = SAMGR_Malloc(sizeof(Router));
if (router == NULL) { if (router == NULL) {
HILOG_ERROR(HILOG_MODULE_SAMGR, "Memory is not enough! Identity<%d, %d, %p>", HILOG_ERROR(HILOG_MODULE_SAMGR, "Memory is not enough! Identity<%d, %d>",
id->serviceId, id->featureId, id->queueId); id->serviceId, id->featureId);
return EC_NOMEMORY; return EC_NOMEMORY;
} }
router->saName = *saName; router->saName = *saName;
@ -234,7 +234,7 @@ static int32 ParseGetAllSysCapsReply(IpcIo *reply, char sysCaps[MAX_SYSCAP_NUM][
uint32 size = IpcIoPopUint32(reply); uint32 size = IpcIoPopUint32(reply);
size = ((size > MAX_SYSCAP_NUM) ? MAX_SYSCAP_NUM : size); size = ((size > MAX_SYSCAP_NUM) ? MAX_SYSCAP_NUM : size);
int cnt = *sysCapNum; int cnt = *sysCapNum;
for (int i = 0; i < size; i++) { for (uint32 i = 0; i < size; i++) {
int len = 0; int len = 0;
char *sysCap = (char *)IpcIoPopString(reply, &len); char *sysCap = (char *)IpcIoPopString(reply, &len);
if (sysCap == NULL || len == 0) { if (sysCap == NULL || len == 0) {
@ -423,8 +423,8 @@ static int Dispatch(const IpcContext *context, void *ipcMsg, IpcIo *data, void *
uint32 *ref = NULL; uint32 *ref = NULL;
int ret = SAMGR_SendSharedDirectRequest(&router->identity, &request, &resp, &ref, HandleIpc); int ret = SAMGR_SendSharedDirectRequest(&router->identity, &request, &resp, &ref, HandleIpc);
if (ret != EC_SUCCESS) { if (ret != EC_SUCCESS) {
HILOG_ERROR(HILOG_MODULE_SAMGR, "Router[%u] Service<%d, %d, %p> is busy", HILOG_ERROR(HILOG_MODULE_SAMGR, "Router[%u] Service<%d, %d> is busy",
token, router->identity.serviceId, router->identity.featureId, router->identity.queueId); token, router->identity.serviceId, router->identity.featureId);
goto ERROR; goto ERROR;
} }
#endif #endif
@ -447,7 +447,7 @@ static void HandleIpc(const Request *request, const Response *response)
if (router == NULL || router->proxy == NULL || router->proxy->Invoke == NULL) { if (router == NULL || router->proxy == NULL || router->proxy->Invoke == NULL) {
FreeBuffer(endpoint->context, ipcMsg); FreeBuffer(endpoint->context, ipcMsg);
HILOG_ERROR(HILOG_MODULE_SAMGR, "Invalid IPC router<%p>!", router); HILOG_ERROR(HILOG_MODULE_SAMGR, "Invalid IPC router!");
return; return;
} }

View File

@ -143,8 +143,8 @@ static TaskConfig GetTaskConfig(Service *service)
static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req, IpcIo *reply) static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req, IpcIo *reply)
{ {
SamgrServer *server = GET_OBJECT(iProxy, SamgrServer, iUnknown); SamgrServer *server = GET_OBJECT(iProxy, SamgrServer, iUnknown);
int32 resource = IpcIoPopUint32(req); uint32_t resource = IpcIoPopUint32(req);
int32 option = IpcIoPopUint32(req); uint32_t option = IpcIoPopUint32(req);
if (server == NULL || resource >= RES_BUTT || resource < 0 || g_functions[resource] == NULL) { if (server == NULL || resource >= RES_BUTT || resource < 0 || g_functions[resource] == NULL) {
HILOG_ERROR(HILOG_MODULE_SAMGR, "Invalid Msg<%d, %d, %d>", resource, option, funcId); HILOG_ERROR(HILOG_MODULE_SAMGR, "Invalid Msg<%d, %d, %d>", resource, option, funcId);
return EC_INVALID; return EC_INVALID;