commit
e6aec64a74
|
@ -75,7 +75,7 @@ IUnknown *SAMGR_CreateIProxy(const IpcContext *context, const char *service, con
|
|||
header->key.service = service;
|
||||
header->key.feature = feature;
|
||||
header->context = context;
|
||||
(void)RegisteDeathCallback(context, identity, OnServiceExit, client, &header->deadId);
|
||||
(void)RegisterDeathCallback(context, identity, OnServiceExit, client, &header->deadId);
|
||||
|
||||
IClientEntry *entry = &client->entry;
|
||||
entry->iUnknown.Invoke = ProxyInvoke;
|
||||
|
@ -179,7 +179,7 @@ static int ProxyInvoke(IClientProxy *proxy, int funcId, IpcIo *request, IOwner o
|
|||
if (header->target.handle == INVALID_INDEX) {
|
||||
return EC_INVALID;
|
||||
}
|
||||
(void)RegisteDeathCallback(header->context, header->target, OnServiceExit, header, &header->deadId);
|
||||
(void)RegisterDeathCallback(header->context, header->target, OnServiceExit, header, &header->deadId);
|
||||
}
|
||||
|
||||
IpcIo reply;
|
||||
|
@ -187,7 +187,7 @@ static int ProxyInvoke(IClientProxy *proxy, int funcId, IpcIo *request, IOwner o
|
|||
IpcFlag flag = (notify == NULL) ? LITEIPC_FLAG_ONEWAY : LITEIPC_FLAG_DEFAULT;
|
||||
int ret = Transact(header->context, header->target, funcId, request, &reply, flag, (uintptr_t *)&replyBuf);
|
||||
if (ret != LITEIPC_OK) {
|
||||
(void)UnRegisteDeathCallback(header->target, header->deadId);
|
||||
(void)UnregisterDeathCallback(header->target, header->deadId);
|
||||
header->deadId = INVALID_INDEX;
|
||||
header->target.handle = INVALID_INDEX;
|
||||
header->target.token = INVALID_INDEX;
|
||||
|
@ -209,7 +209,7 @@ static int OnServiceExit(const IpcContext *context, void *ipcMsg, IpcIo *data, v
|
|||
{
|
||||
(void)data;
|
||||
IClientHeader *header = (IClientHeader *)argv;
|
||||
(void)UnRegisteDeathCallback(header->target, header->deadId);
|
||||
(void)UnregisterDeathCallback(header->target, header->deadId);
|
||||
header->deadId = INVALID_INDEX;
|
||||
header->target.handle = INVALID_INDEX;
|
||||
header->target.token = INVALID_INDEX;
|
||||
|
|
|
@ -224,8 +224,8 @@ static void *Receive(void *argv)
|
|||
ret = endpoint->registerEP(endpoint->context, &endpoint->identity);
|
||||
if (ret == EC_SUCCESS) {
|
||||
SvcIdentity samgr = {SAMGR_HANDLE, SAMGR_TOKEN, SAMGR_COOKIE};
|
||||
(void)UnRegisteDeathCallback(samgr, endpoint->deadId);
|
||||
(void)RegisteDeathCallback(endpoint->context, samgr, OnSamgrServerExit, endpoint, &endpoint->deadId);
|
||||
(void)UnregisterDeathCallback(samgr, endpoint->deadId);
|
||||
(void)RegisterDeathCallback(endpoint->context, samgr, OnSamgrServerExit, endpoint, &endpoint->deadId);
|
||||
break;
|
||||
}
|
||||
++retry;
|
||||
|
@ -437,8 +437,8 @@ static int OnSamgrServerExit(const IpcContext *context, void *ipcMsg, IpcIo *dat
|
|||
identity.handle = SAMGR_HANDLE;
|
||||
identity.token = SAMGR_TOKEN;
|
||||
identity.cookie = SAMGR_COOKIE;
|
||||
(void)UnRegisteDeathCallback(identity, endpoint->deadId);
|
||||
(void)RegisteDeathCallback(endpoint->context, identity, OnSamgrServerExit, endpoint, &endpoint->deadId);
|
||||
(void)UnregisterDeathCallback(identity, endpoint->deadId);
|
||||
(void)RegisterDeathCallback(endpoint->context, identity, OnSamgrServerExit, endpoint, &endpoint->deadId);
|
||||
int remain = RegisterRemoteFeatures(endpoint);
|
||||
HILOG_INFO(HILOG_MODULE_SAMGR, "Reconnect and register finished! remain<%d> iunknown!", remain);
|
||||
return EC_SUCCESS;
|
||||
|
|
|
@ -197,8 +197,8 @@ static int ProcEndpoint(SamgrServer *server, int32 option, void *origin, IpcIo *
|
|||
handle.handle = identity.handle;
|
||||
handle.deadId = INVALID_INDEX;
|
||||
(void)SASTORA_SaveHandleByPid(&server->store, handle);
|
||||
(void)UnRegisteDeathCallback(identity, handle.deadId);
|
||||
(void)RegisteDeathCallback(server->endpoint->context, identity, OnEndpointExit, (void*)((uintptr_t)pid),
|
||||
(void)UnregisterDeathCallback(identity, handle.deadId);
|
||||
(void)RegisterDeathCallback(server->endpoint->context, identity, OnEndpointExit, (void*)((uintptr_t)pid),
|
||||
&handle.deadId);
|
||||
}
|
||||
MUTEX_Unlock(server->mtx);
|
||||
|
|
Loading…
Reference in New Issue