Home
last modified time | relevance | path

Searched refs:task (Results 1 – 25 of 135) sorted by relevance

123456

/base/startup/init/services/loopevent/task/
Dle_task.c22 int CheckTaskFlags(const BaseTask *task, uint32_t flags) in CheckTaskFlags() argument
24 if (task == NULL) { in CheckTaskFlags()
27 return ((task->flags & flags) == flags); in CheckTaskFlags()
30 int GetSocketFd(const TaskHandle task) in GetSocketFd() argument
32 BaseTask *stream = (BaseTask *)task; in GetSocketFd()
41 BaseTask *task = (BaseTask *)malloc(size + info->userDataSize); in CreateTask() local
42 LE_CHECK(task != NULL, return NULL, "Failed to alloc for task"); in CreateTask()
43 HASHMAPInitNode(&task->hashNode); in CreateTask()
45 task->flags = info->flags; in CreateTask()
46 task->taskId.fd = fd; in CreateTask()
[all …]
Dle_streamtask.c131 BaseTask *task = (BaseTask *)taskHandle; in HandleStreamTaskClose_() local
132 CloseTask(loopHandle, task); in HandleStreamTaskClose_()
133 if (task->taskId.fd > 0) { in HandleStreamTaskClose_()
134 close(task->taskId.fd); in HandleStreamTaskClose_()
171 StreamServerTask *task = (StreamServerTask *)CreateTask(loopHandle, fd, &info->baseInfo, in LE_CreateStreamServer() local
173 LE_CHECK(task != NULL, close(fd); in LE_CreateStreamServer()
175 task->base.handleEvent = HandleServerEvent_; in LE_CreateStreamServer()
176 task->base.innerClose = HandleStreamTaskClose_; in LE_CreateStreamServer()
177 task->incommingConnect = info->incommingConnect; in LE_CreateStreamServer()
178 loop->addEvent(loop, (const BaseTask *)task, Event_Read); in LE_CreateStreamServer()
[all …]
Dle_task.h52 typedef LE_STATUS (*HandleTaskEvent)(const LoopHandle loop, const TaskHandle task, uint32_t oper);
53 typedef void (*HandleTaskClose)(const LoopHandle loop, const TaskHandle task);
120 LE_Buffer *GetNextBuffer(StreamTask *task, const LE_Buffer *next);
121 LE_Buffer *GetFirstBuffer(StreamTask *task);
122 int IsBufferEmpty(StreamTask *task);
124 void FreeBuffer(const LoopHandle loop, StreamTask *task, LE_Buffer *buffer);
125 void AddBuffer(StreamTask *task, LE_Buffer *buffer);
128 void CloseTask(const LoopHandle loopHandle, BaseTask *task);
129 int GetSocketFd(const TaskHandle task);
130 int CheckTaskFlags(const BaseTask *task, uint32_t flags);
/base/startup/init/services/loopevent/signal/
Dle_signal.c27 static LE_STATUS HandleSignalEvent_(const LoopHandle loop, const TaskHandle task, uint32_t oper) in HandleSignalEvent_() argument
33 ssize_t s = read(GetSocketFd(task), &fdsi, sizeof(fdsi)); in HandleSignalEvent_()
35 SignalTask *sigTask = (SignalTask *)task; in HandleSignalEvent_()
44 BaseTask *task = (BaseTask *)signalHandle; in HandleSignalTaskClose_() local
45 CloseTask(loopHandle, task); in HandleSignalTaskClose_()
46 close(task->taskId.fd); in HandleSignalTaskClose_()
58 SignalTask *task = (SignalTask *)CreateTask(loopHandle, sfd, &info, sizeof(SignalTask)); in LE_CreateSignalTask() local
59 LE_CHECK(task != NULL, return LE_NO_MEMORY, "Failed to create task"); in LE_CreateSignalTask()
60 task->base.handleEvent = HandleSignalEvent_; in LE_CreateSignalTask()
61 task->base.innerClose = HandleSignalTaskClose_; in LE_CreateSignalTask()
[all …]
/base/security/device_auth/services/group_manager/src/
Dgroup_manager_common.c23 static int32_t InitGroupManagerTask(GroupManagerTask *task, GMTaskParams *taskParams, TaskFunc func) in InitGroupManagerTask() argument
25 task->base.doAction = func; in InitGroupManagerTask()
26 task->base.destroy = DestroyGroupManagerTask; in InitGroupManagerTask()
27 task->osAccountId = taskParams->osAccountId; in InitGroupManagerTask()
28 task->opCode = taskParams->opCode; in InitGroupManagerTask()
29 task->reqId = taskParams->reqId; in InitGroupManagerTask()
30 task->params = taskParams->params; in InitGroupManagerTask()
31 return BindCallbackToTask(task, taskParams->params); in InitGroupManagerTask()
47 int32_t BindCallbackToTask(GroupManagerTask *task, const CJson *jsonParams) in BindCallbackToTask() argument
54 task->cb = GetGMCallbackByAppId(appId); in BindCallbackToTask()
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/standard_exchange_task/
Dstandard_client_bind_exchange_task.c33 static int ExchangeRequest(AsyBaseCurTask *task, PakeParams *params, const CJson *in, CJson *out, i… in ExchangeRequest() argument
36 if (task->taskStatus != TASK_STATUS_CLIENT_BIND_EXCHANGE_BEGIN) { in ExchangeRequest()
37 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeRequest()
41 StandardBindExchangeClientTask *realTask = (StandardBindExchangeClientTask *)task; in ExchangeRequest()
71 task->taskStatus = TASK_STATUS_CLIENT_BIND_EXCHANGE_REQUEST; in ExchangeRequest()
79 static int ExchangeConfirm(AsyBaseCurTask *task, PakeParams *params, const CJson *in, int *status) in ExchangeConfirm() argument
81 if (task->taskStatus < TASK_STATUS_CLIENT_BIND_EXCHANGE_REQUEST) { in ExchangeConfirm()
82 LOGE("Invalid taskStatus: %d", task->taskStatus); in ExchangeConfirm()
85 if (task->taskStatus > TASK_STATUS_CLIENT_BIND_EXCHANGE_REQUEST) { in ExchangeConfirm()
86 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeConfirm()
[all …]
Dstandard_client_unbind_exchange_task.c33 static int ExchangeRequest(AsyBaseCurTask *task, PakeParams *params, const CJson *in, CJson *out, i… in ExchangeRequest() argument
36 if (task->taskStatus != TASK_STATUS_CLIENT_UNBIND_EXCHANGE_BEGIN) { in ExchangeRequest()
37 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeRequest()
41 StandardUnbindExchangeClientTask *realTask = (StandardUnbindExchangeClientTask *)task; in ExchangeRequest()
74 task->taskStatus = TASK_STATUS_CLIENT_UNBIND_EXCHANGE_REQUEST; in ExchangeRequest()
82 static int ExchangeConfirm(AsyBaseCurTask *task, PakeParams *params, const CJson *in, int *status) in ExchangeConfirm() argument
84 if (task->taskStatus < TASK_STATUS_CLIENT_UNBIND_EXCHANGE_REQUEST) { in ExchangeConfirm()
89 if (task->taskStatus > TASK_STATUS_CLIENT_UNBIND_EXCHANGE_REQUEST) { in ExchangeConfirm()
90 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeConfirm()
95 StandardUnbindExchangeClientTask *realTask = (StandardUnbindExchangeClientTask *)task; in ExchangeConfirm()
[all …]
Dstandard_server_unbind_exchange_task.c33 static int ExchangeStart(AsyBaseCurTask *task, PakeParams *params, CJson *out, int *status) in ExchangeStart() argument
36 if (task->taskStatus != TASK_STATUS_SERVER_UNBIND_EXCHANGE_BEGIN) { in ExchangeStart()
37 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeStart()
60 task->taskStatus = TASK_STATUS_SERVER_UNBIND_EXCHANGE_START; in ExchangeStart()
65 static int ExchangeResponse(AsyBaseCurTask *task, PakeParams *params, const CJson *in, CJson *out, … in ExchangeResponse() argument
71 if (task->taskStatus < TASK_STATUS_SERVER_UNBIND_EXCHANGE_START) { in ExchangeResponse()
74 if (task->taskStatus > TASK_STATUS_SERVER_UNBIND_EXCHANGE_START) { in ExchangeResponse()
75 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeResponse()
80 StandardUnbindExchangeServerTask *realTask = (StandardUnbindExchangeServerTask *)task; in ExchangeResponse()
111 task->taskStatus = TASK_STATUS_SERVER_UNBIND_EXCHANGE_RESPONSE; in ExchangeResponse()
[all …]
Dstandard_server_bind_exchange_task.c33 static int ExchangeStart(AsyBaseCurTask *task, PakeParams *params, CJson *out, int *status) in ExchangeStart() argument
36 if (task->taskStatus != TASK_STATUS_SERVER_BIND_EXCHANGE_BEGIN) { in ExchangeStart()
37 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeStart()
60 task->taskStatus = TASK_STATUS_SERVER_BIND_EXCHANGE_START; in ExchangeStart()
65 static int ExchangeResponse(AsyBaseCurTask *task, PakeParams *params, const CJson *in, CJson *out, … in ExchangeResponse() argument
71 if (task->taskStatus < TASK_STATUS_SERVER_BIND_EXCHANGE_START) { in ExchangeResponse()
74 if (task->taskStatus > TASK_STATUS_SERVER_BIND_EXCHANGE_START) { in ExchangeResponse()
75 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in ExchangeResponse()
80 StandardBindExchangeServerTask *realTask = (StandardBindExchangeServerTask *)task; in ExchangeResponse()
118 task->taskStatus = TASK_STATUS_SERVER_BIND_EXCHANGE_RESPONSE; in ExchangeResponse()
[all …]
/base/security/device_auth/services/
Ddevice_auth.c35 static void DestroyGroupAuthTask(HcTaskBase *task) in DestroyGroupAuthTask() argument
37 AuthDeviceTask *realTask = (AuthDeviceTask *)task; in DestroyGroupAuthTask()
41 static bool InitAuthDeviceTask(int32_t osAccountId, AuthDeviceTask *task, int64_t authReqId, CJson … in InitAuthDeviceTask() argument
44 task->base.doAction = DoAuthDevice; in InitAuthDeviceTask()
45 task->base.destroy = DestroyGroupAuthTask; in InitAuthDeviceTask()
46 task->authReqId = authReqId; in InitAuthDeviceTask()
55 task->authParams = authParams; in InitAuthDeviceTask()
56 task->callback = gaCallback; in InitAuthDeviceTask()
57 if (task->callback == NULL) { in InitAuthDeviceTask()
64 static bool InitProcessDataTask(AuthDeviceTask *task, int64_t authReqId, in InitProcessDataTask() argument
[all …]
/base/security/device_auth/deps_adapter/os_adapter/impl/src/
Dhc_task_thread.c31 HcTaskWrap task; in IMPLEMENT_HC_VECTOR() local
32 HcBool ret = thread->tasks.popFront(&thread->tasks, &task); in IMPLEMENT_HC_VECTOR()
35 return task.task; in IMPLEMENT_HC_VECTOR()
40 static void PushTask(struct HcTaskThreadT* thread, HcTaskBase* task) in PushTask() argument
42 if (thread == NULL || task == NULL) { in PushTask()
48 taskWarp.task = task; in PushTask()
60 if (taskWarp->task->destroy) { in Clear()
61 taskWarp->task->destroy(taskWarp->task); in Clear()
63 HcFree(taskWarp->task); in Clear()
105 HcTaskBase* task = PopTask(thread); in TaskThreadLoop() local
[all …]
/base/startup/init/services/loopevent/timer/
Dle_timer.c41 static LE_STATUS HandleTimerEvent_(const LoopHandle loop, const TaskHandle task, uint32_t oper) in HandleTimerEvent_() argument
47 (void)read(GetSocketFd(task), &repeat, sizeof(repeat)); in HandleTimerEvent_()
48 TimerTask *timer = (TimerTask *)task; in HandleTimerEvent_()
49 int fd = GetSocketFd(task); in HandleTimerEvent_()
51 uint64_t userData = *(uint64_t *)LE_GetUserData(task); in HandleTimerEvent_()
52 timer->processTimer(task, (void *)userData); in HandleTimerEvent_()
68 BaseTask *task = (BaseTask *)taskHandle; in HandleTimerClose_() local
69 CloseTask(loopHandle, task); in HandleTimerClose_()
70 close(task->taskId.fd); in HandleTimerClose_()
85 TimerTask *task = (TimerTask *)CreateTask(loopHandle, fd, &baseInfo, sizeof(TimerTask)); in LE_CreateTimer() local
[all …]
/base/hiviewdfx/hicollie/frameworks/native/
Dwatchdog_inner.cpp67 void WatchdogInner::RunOneShotTask(const std::string& name, Task&& task, uint64_t delay) in RunOneShotTask() argument
69 if (name.empty() || task == nullptr) { in RunOneShotTask()
79 InsertWatchdogTaskLocked(name, WatchdogTask(name, std::move(task), delay, 0, true)); in RunOneShotTask()
82 void WatchdogInner::RunPeriodicalTask(const std::string& name, Task&& task, uint64_t interval, uint… in RunPeriodicalTask() argument
84 if (name.empty() || task == nullptr) { in RunPeriodicalTask()
95 InsertWatchdogTaskLocked(name, WatchdogTask(name, std::move(task), delay, interval, false)); in RunPeriodicalTask()
117 bool WatchdogInner::InsertWatchdogTaskLocked(const std::string& name, WatchdogTask&& task) in InsertWatchdogTaskLocked() argument
119 if (!task.isOneshotTask && IsTaskExistLocked(name)) { in InsertWatchdogTaskLocked()
129 checkerQueue_.push(std::move(task)); in InsertWatchdogTaskLocked()
130 if (!task.isOneshotTask) { in InsertWatchdogTaskLocked()
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/
Dpake_v1_client_protocol_task.c37 static void DestroyPakeV1ProtocolClientTask(struct AsyBaseCurTaskT *task) in DestroyPakeV1ProtocolClientTask() argument
39 HcFree(task); in DestroyPakeV1ProtocolClientTask()
42 static int PakeRequest(AsyBaseCurTask *task, PakeParams *params, CJson *out, int *status) in PakeRequest() argument
44 if (task->taskStatus != TASK_STATUS_CLIENT_PAKE_BEGIN) { in PakeRequest()
45 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in PakeRequest()
82 task->taskStatus = TASK_STATUS_CLIENT_PAKE_REQUEST; in PakeRequest()
138 static int PakeClientConfirm(AsyBaseCurTask *task, PakeParams *params, const CJson *in, CJson *out,… in PakeClientConfirm() argument
141 if (task->taskStatus < TASK_STATUS_CLIENT_PAKE_REQUEST) { in PakeClientConfirm()
142 LOGE("Invalid taskStatus: %d", task->taskStatus); in PakeClientConfirm()
145 if (task->taskStatus > TASK_STATUS_CLIENT_PAKE_REQUEST) { in PakeClientConfirm()
[all …]
Dpake_v1_server_protocol_task.c36 static void DestroyPakeV1ProtocolServerTask(struct AsyBaseCurTaskT *task) in DestroyPakeV1ProtocolServerTask() argument
38 HcFree(task); in DestroyPakeV1ProtocolServerTask()
76 static int PakeResponse(AsyBaseCurTask *task, PakeParams *params, const CJson *in, CJson *out, int … in PakeResponse() argument
79 if (task->taskStatus > TASK_STATUS_SERVER_PAKE_BEGIN) { in PakeResponse()
80 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in PakeResponse()
121 task->taskStatus = TASK_STATUS_SERVER_PAKE_RESPONSE; in PakeResponse()
126 static int PakeServerConfirm(AsyBaseCurTask *task, PakeParams *params, const CJson *in, CJson *out,… in PakeServerConfirm() argument
129 if (task->taskStatus < TASK_STATUS_SERVER_PAKE_RESPONSE) { in PakeServerConfirm()
130 LOGE("Invalid taskStatus: %d", task->taskStatus); in PakeServerConfirm()
133 if (task->taskStatus > TASK_STATUS_SERVER_PAKE_RESPONSE) { in PakeServerConfirm()
[all …]
/base/security/device_auth/services/authenticators/src/account_related/
Daccount_task_main.c94 static void DestroyTaskT(AccountTask *task) in DestroyTaskT() argument
96 if (task == NULL) { in DestroyTaskT()
99 if (task->subTask != NULL) { in DestroyTaskT()
100 task->subTask->destroyTask(task->subTask); in DestroyTaskT()
102 HcFree(task); in DestroyTaskT()
133 static int32_t ProcessTaskT(AccountTask *task, const CJson *in, CJson *out, int32_t *status) in ProcessTaskT() argument
139 int32_t res = task->subTask->process(task->subTask, in, out, status); in ProcessTaskT()
142 int32_t operationCode = MapSubTaskTypeToOpCode(task->subTask->getTaskType()); in ProcessTaskT()
148 static int32_t NegotiateAndCreateSubTask(AccountTask *task, const CJson *in, CJson *out) in NegotiateAndCreateSubTask() argument
165 task->subTask = verInfo->createTask(in, out, verInfo); in NegotiateAndCreateSubTask()
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/
Diso_client_task.c24 static int GetIsoClientTaskType(const struct SubTaskBaseT *task) in GetIsoClientTaskType() argument
26 IsoClientTask *realTask = (IsoClientTask *)task; in GetIsoClientTaskType()
34 static void DestroyIsoClientTask(struct SubTaskBaseT *task) in DestroyIsoClientTask() argument
36 IsoClientTask *innerTask = (IsoClientTask *)task; in DestroyIsoClientTask()
93 static int Process(struct SubTaskBaseT *task, const CJson *in, CJson *out, int32_t *status) in Process() argument
95 IsoClientTask *realTask = (IsoClientTask *)task; in Process()
113 IsoClientTask *task = (IsoClientTask *)HcMalloc(sizeof(IsoClientTask), 0); in CreateIsoClientTask() local
114 if (task == NULL) { in CreateIsoClientTask()
119 task->taskBase.getTaskType = GetIsoClientTaskType; in CreateIsoClientTask()
120 task->taskBase.destroyTask = DestroyIsoClientTask; in CreateIsoClientTask()
[all …]
Diso_server_task.c24 static int GetIsoServerTaskType(const struct SubTaskBaseT *task) in GetIsoServerTaskType() argument
26 IsoServerTask *realTask = (IsoServerTask *)task; in GetIsoServerTaskType()
34 static void DestroyIsoServerTask(struct SubTaskBaseT *task) in DestroyIsoServerTask() argument
36 IsoServerTask *innerTask = (IsoServerTask *)task; in DestroyIsoServerTask()
100 static int Process(struct SubTaskBaseT *task, const CJson *in, CJson *out, int32_t *status) in Process() argument
102 IsoServerTask *realTask = (IsoServerTask *)task; in Process()
121 IsoServerTask *task = (IsoServerTask *)HcMalloc(sizeof(IsoServerTask), 0); in CreateIsoServerTask() local
122 if (task == NULL) { in CreateIsoServerTask()
127 task->taskBase.getTaskType = GetIsoServerTaskType; in CreateIsoServerTask()
128 task->taskBase.destroyTask = DestroyIsoServerTask; in CreateIsoServerTask()
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/
Ddas_task_main.c114 static void DestroyTaskT(Task *task) in DestroyTaskT() argument
116 if (task == NULL) { in DestroyTaskT()
121 FOR_EACH_HC_VECTOR(task->vec, index, ptr) { in DestroyTaskT()
126 DESTROY_HC_VECTOR(SubTaskVec, &(task->vec)); in DestroyTaskT()
127 HcFree(task); in DestroyTaskT()
130 static int ProcessMultiTask(Task *task, const CJson *in, CJson *out, int32_t *status) in ProcessMultiTask() argument
141 FOR_EACH_HC_VECTOR(task->vec, index, ptr) { in ProcessMultiTask()
178 static int NegotiateAndProcessTask(Task *task, const CJson *in, CJson *out, int32_t *status) in NegotiateAndProcessTask() argument
187 res = NegotiateVersion(&minVersionPeer, &curVersionPeer, &(task->versionInfo.curVersion)); in NegotiateAndProcessTask()
192 if (!IsVersionEqual(&(task->versionInfo.curVersion), &curVersionPeer)) { in NegotiateAndProcessTask()
[all …]
/base/startup/init/services/loopevent/loop/
Dle_loop.c29 BaseTask *task = HASHMAP_ENTRY(node, BaseTask, hashNode); in TaskKeyCompare() local
31 return (int)task->taskId.fd - taskId->taskId.fd; in TaskKeyCompare()
36 BaseTask *task = HASHMAP_ENTRY(node, BaseTask, hashNode); in TaskGetNodeHasCode() local
37 return task->taskId.fd; in TaskGetNodeHasCode()
48 BaseTask *task = HASHMAP_ENTRY(node, BaseTask, hashNode); in TaskNodeFree() local
49 CloseTask(LE_GetDefaultLoop(), task); in TaskNodeFree()
88 BaseTask *task = GetTaskByFd((EventLoop *)loop, fd); in ProcessEvent() local
89 if (task != NULL) { in ProcessEvent()
91 task->flags |= TASK_FLAGS_INVALID; in ProcessEvent()
93 task->handleEvent((LoopHandle)loop, (TaskHandle)task, oper); in ProcessEvent()
[all …]
/base/update/updater/services/script/threadpool/
Dthreadpool.cpp66 taskQueue_[k].task.processor(threadIndex); in ThreadRun()
84 for (auto& task : taskQueue_) { in ~ThreadPool() local
85 for (auto c : task.subTaskFlag) { in ~ThreadPool()
91 void ThreadPool::AddTask(Task &&task) in AddTask() argument
94 g_threadPool->AddNewTask(std::move(task)); in AddTask()
98 void ThreadPool::AddNewTask(Task &&task) in AddNewTask() argument
105 if (task.workSize <= 1 || index < 0) { in AddNewTask()
106 for (int32_t i = 0; i < task.workSize; ++i) { in AddNewTask()
107 task.processor(i); in AddNewTask()
112 int32_t workSize = task.workSize; in AddNewTask()
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/pake_v1_task/
Dpake_v1_server_task.c26 static int GetPakeV1ServerTaskType(const struct SubTaskBaseT *task) in GetPakeV1ServerTaskType() argument
28 PakeV1ServerTask *realTask = (PakeV1ServerTask *)task; in GetPakeV1ServerTaskType()
36 static void DestroyPakeV1ServerTask(struct SubTaskBaseT *task) in DestroyPakeV1ServerTask() argument
38 PakeV1ServerTask *innerTask = (PakeV1ServerTask *)task; in DestroyPakeV1ServerTask()
121 static int Process(struct SubTaskBaseT *task, const CJson *in, CJson *out, int *status) in Process() argument
123 PakeV1ServerTask *realTask = (PakeV1ServerTask *)task; in Process()
144 PakeV1ServerTask *task = (PakeV1ServerTask *)HcMalloc(sizeof(PakeV1ServerTask), 0); in CreatePakeV1ServerTask() local
145 if (task == NULL) { in CreatePakeV1ServerTask()
150 task->taskBase.getTaskType = GetPakeV1ServerTaskType; in CreatePakeV1ServerTask()
151 task->taskBase.destroyTask = DestroyPakeV1ServerTask; in CreatePakeV1ServerTask()
[all …]
Dpake_v1_client_task.c26 static int GetPakeV1ClientTaskType(const struct SubTaskBaseT *task) in GetPakeV1ClientTaskType() argument
28 PakeV1ClientTask *realTask = (PakeV1ClientTask *)task; in GetPakeV1ClientTaskType()
36 static void DestroyPakeV1ClientTask(struct SubTaskBaseT *task) in DestroyPakeV1ClientTask() argument
38 PakeV1ClientTask *innerTask = (PakeV1ClientTask *)task; in DestroyPakeV1ClientTask()
121 static int Process(struct SubTaskBaseT *task, const CJson *in, CJson *out, int *status) in Process() argument
123 PakeV1ClientTask *realTask = (PakeV1ClientTask *)task; in Process()
144 PakeV1ClientTask *task = (PakeV1ClientTask *)HcMalloc(sizeof(PakeV1ClientTask), 0); in CreatePakeV1ClientTask() local
145 if (task == NULL) { in CreatePakeV1ClientTask()
150 task->taskBase.getTaskType = GetPakeV1ClientTaskType; in CreatePakeV1ClientTask()
151 task->taskBase.destroyTask = DestroyPakeV1ClientTask; in CreatePakeV1ClientTask()
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/iso_protocol_task/
Diso_client_protocol_task.c36 static void DestroyProtocolClientTask(struct SymBaseCurTaskT *task) in DestroyProtocolClientTask() argument
38 HcFree(task); in DestroyProtocolClientTask()
80 static int IsoClientStart(SymBaseCurTask *task, IsoParams *params, CJson *out, int32_t *status) in IsoClientStart() argument
82 if (task->taskStatus != TASK_STATUS_BEGIN) { in IsoClientStart()
83 LOGI("The message is repeated, ignore it, status: %d", task->taskStatus); in IsoClientStart()
102 task->taskStatus = TASK_STATUS_SERVER_RES_TOKEN; in IsoClientStart()
152 static int CalculateTokenClient(SymBaseCurTask *task, IsoParams *params, const CJson *in, CJson *ou… in CalculateTokenClient() argument
155 if (task->taskStatus < TASK_STATUS_SERVER_RES_TOKEN) { in CalculateTokenClient()
156 LOGE("Invalid taskStatus: %d", task->taskStatus); in CalculateTokenClient()
160 if (task->taskStatus > TASK_STATUS_SERVER_RES_TOKEN) { in CalculateTokenClient()
[all …]
/base/security/device_auth/services/authenticators/src/account_related/auth/pake_v2_auth_task/
Dpake_v2_auth_server_task.c42 static void DestroyAuthServerAuthTask(TaskBase *task) in DestroyAuthServerAuthTask() argument
44 if (task == NULL) { in DestroyAuthServerAuthTask()
48 PakeV2AuthServerTask *innerTask = (PakeV2AuthServerTask *)task; in DestroyAuthServerAuthTask()
53 static int32_t DealAsyStepOneData(PakeV2AuthServerTask *task, const CJson *in) in DealAsyStepOneData() argument
55 int32_t res = VerifyPkSignPeer(&task->params); in DealAsyStepOneData()
60 if (GenerateEcdhSharedKey(&task->params) != HC_SUCCESS) { in DealAsyStepOneData()
64 res = ServerResponsePakeV2Protocol(&task->params.pakeParams); in DealAsyStepOneData()
69 if (ExtractPakeSelfId(&task->params) != HC_SUCCESS) { in DealAsyStepOneData()
115 static int32_t AsyAuthServerStepOne(TaskBase *task, const CJson *in, CJson *out, int32_t *status) in AsyAuthServerStepOne() argument
117 PakeV2AuthServerTask *innerTask = (PakeV2AuthServerTask *)task; in AsyAuthServerStepOne()
[all …]

123456