update samgr_server/source/samgr_server.c.

This commit is contained in:
zjucx 2020-11-26 10:53:26 +08:00 committed by Gitee
parent 10e4f62bb8
commit de9905cd40
1 changed files with 1 additions and 4 deletions

View File

@ -187,10 +187,7 @@ static int ProcEndpoint(SamgrServer *server, int32 option, void *origin, IpcIo *
int index = SASTORA_FindHandleByPid(&g_server.store, pid, &handle); int index = SASTORA_FindHandleByPid(&g_server.store, pid, &handle);
if (index == INVALID_INDEX) { if (index == INVALID_INDEX) {
SvcIdentity identity = {(uint32)INVALID_INDEX, (uint32)INVALID_INDEX, (uint32)INVALID_INDEX}; SvcIdentity identity = {(uint32)INVALID_INDEX, (uint32)INVALID_INDEX, (uint32)INVALID_INDEX};
identity.handle = IpcIoPopUint32(req); (void)GenServiceHandle(&identity, GetCallingTid(origin));
if (identity.handle == (uint32)INVALID_INDEX) { // generate handle
(void)GenServiceHandle(&identity, GetCallingTid(origin));
}
handle.pid = pid; handle.pid = pid;
handle.uid = GetCallingUid(origin); handle.uid = GetCallingUid(origin);