Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
7815064b
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7815064b
编写于
7月 25, 2022
作者:
L
laiguizhong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改拼写错误
Signed-off-by:
N
laiguizhong
<
laiguizhong@huawei.com
>
上级
916544d7
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
19 addition
and
19 deletion
+19
-19
interfaces/innerkits/control_fd/control_fd_client.c
interfaces/innerkits/control_fd/control_fd_client.c
+4
-4
interfaces/innerkits/control_fd/control_fd_service.c
interfaces/innerkits/control_fd/control_fd_service.c
+2
-2
interfaces/innerkits/include/service_control.h
interfaces/innerkits/include/service_control.h
+1
-1
services/loopevent/include/loop_event.h
services/loopevent/include/loop_event.h
+2
-2
services/loopevent/task/le_streamtask.c
services/loopevent/task/le_streamtask.c
+6
-6
services/loopevent/task/le_task.h
services/loopevent/task/le_task.h
+2
-2
services/param/linux/param_msgadp.c
services/param/linux/param_msgadp.c
+1
-1
services/utils/init_utils.c
services/utils/init_utils.c
+1
-1
未找到文件。
interfaces/innerkits/control_fd/control_fd_client.c
浏览文件 @
7815064b
...
...
@@ -68,9 +68,9 @@ static void CmdOnRecvMessage(const TaskHandle task, const uint8_t *buffer, uint3
BEGET_LOGI
(
"[control_fd] CmdOnRecvMessage %s len %d."
,
(
char
*
)
buffer
,
buffLen
);
}
static
void
CmdOnConn
t
ectComplete
(
const
TaskHandle
client
)
static
void
CmdOnConnectComplete
(
const
TaskHandle
client
)
{
BEGET_LOGI
(
"[control_fd] CmdOnConn
t
ectComplete"
);
BEGET_LOGI
(
"[control_fd] CmdOnConnectComplete"
);
}
static
void
CmdOnClose
(
const
TaskHandle
task
)
...
...
@@ -105,8 +105,8 @@ static CmdAgent *CmdAgentCreate(const char *server)
info
.
server
=
(
char
*
)
server
;
info
.
baseInfo
.
userDataSize
=
sizeof
(
CmdAgent
);
info
.
baseInfo
.
close
=
CmdOnClose
;
info
.
disConn
t
ectComplete
=
CmdDisConnectComplete
;
info
.
connectComplete
=
CmdOnConn
t
ectComplete
;
info
.
disConnectComplete
=
CmdDisConnectComplete
;
info
.
connectComplete
=
CmdOnConnectComplete
;
info
.
sendMessageComplete
=
CmdOnSendMessageComplete
;
info
.
recvMessage
=
CmdOnRecvMessage
;
LE_STATUS
status
=
LE_CreateStreamClient
(
LE_GetDefaultLoop
(),
&
task
,
&
info
);
...
...
interfaces/innerkits/control_fd/control_fd_service.c
浏览文件 @
7815064b
...
...
@@ -100,7 +100,7 @@ static int CmdOnIncommingConntect(const LoopHandle loop, const TaskHandle server
info
.
baseInfo
.
flags
=
TASK_STREAM
|
TASK_PIPE
|
TASK_CONNECT
;
info
.
baseInfo
.
close
=
OnClose
;
info
.
baseInfo
.
userDataSize
=
sizeof
(
CmdTask
);
info
.
disConn
t
ectComplete
=
NULL
;
info
.
disConnectComplete
=
NULL
;
info
.
sendMessageComplete
=
NULL
;
info
.
recvMessage
=
CmdOnRecvMessage
;
int
ret
=
LE_AcceptStreamClient
(
LE_GetDefaultLoop
(),
server
,
&
client
,
&
info
);
...
...
@@ -127,7 +127,7 @@ void CmdServiceInit(const char *socketPath, CallbackControlFdProcess func)
info
.
server
=
(
char
*
)
socketPath
;
info
.
socketId
=
-
1
;
info
.
baseInfo
.
close
=
NULL
;
info
.
disConn
t
ectComplete
=
NULL
;
info
.
disConnectComplete
=
NULL
;
info
.
incommingConntect
=
CmdOnIncommingConntect
;
info
.
sendMessageComplete
=
NULL
;
info
.
recvMessage
=
NULL
;
...
...
interfaces/innerkits/include/service_control.h
浏览文件 @
7815064b
...
...
@@ -37,7 +37,7 @@ typedef enum {
SERVICE_SUSPENDED
,
SERVICE_FREEZED
,
SERVICE_DISABLED
,
SERVICE_CRITIAL
SERVICE_CRITI
C
AL
}
ServiceStatus
;
enum
ServiceAction
{
...
...
services/loopevent/include/loop_event.h
浏览文件 @
7815064b
...
...
@@ -102,7 +102,7 @@ typedef struct {
LE_BaseInfo
baseInfo
;
char
*
server
;
int
socketId
;
LE_DisConntectComplete
disConn
t
ectComplete
;
LE_DisConntectComplete
disConnectComplete
;
LE_IncommingConntect
incommingConntect
;
LE_SendMessageComplete
sendMessageComplete
;
LE_RecvMessage
recvMessage
;
...
...
@@ -111,7 +111,7 @@ typedef struct {
typedef
struct
{
LE_BaseInfo
baseInfo
;
char
*
server
;
LE_DisConntectComplete
disConn
t
ectComplete
;
LE_DisConntectComplete
disConnectComplete
;
LE_ConntectComplete
connectComplete
;
LE_SendMessageComplete
sendMessageComplete
;
LE_RecvMessage
recvMessage
;
...
...
services/loopevent/task/le_streamtask.c
浏览文件 @
7815064b
...
...
@@ -93,8 +93,8 @@ static LE_STATUS HandleStreamEvent_(const LoopHandle loopHandle, const TaskHandl
}
if
(
status
==
LE_DIS_CONNECTED
)
{
loop
->
delEvent
(
loop
,
GetSocketFd
(
handle
),
Event_Read
|
Event_Write
);
if
(
stream
->
disConn
t
ectComplete
)
{
stream
->
disConn
t
ectComplete
(
handle
);
if
(
stream
->
disConnectComplete
)
{
stream
->
disConnectComplete
(
handle
);
}
LE_CloseStreamTask
(
loopHandle
,
handle
);
}
...
...
@@ -116,8 +116,8 @@ static LE_STATUS HandleClientEvent_(const LoopHandle loopHandle, const TaskHandl
status
=
HandleRecvMsg_
(
loopHandle
,
handle
,
client
->
recvMessage
);
}
if
(
status
==
LE_DIS_CONNECTED
)
{
if
(
client
->
disConn
t
ectComplete
)
{
client
->
disConn
t
ectComplete
(
handle
);
if
(
client
->
disConnectComplete
)
{
client
->
disConnectComplete
(
handle
);
}
client
->
connected
=
0
;
LE_CloseStreamTask
(
loopHandle
,
handle
);
...
...
@@ -201,7 +201,7 @@ LE_STATUS LE_CreateStreamClient(const LoopHandle loopHandle,
task
->
connectComplete
=
info
->
connectComplete
;
task
->
sendMessageComplete
=
info
->
sendMessageComplete
;
task
->
recvMessage
=
info
->
recvMessage
;
task
->
disConn
tectComplete
=
info
->
disConnt
ectComplete
;
task
->
disConn
ectComplete
=
info
->
disConn
ectComplete
;
EventLoop
*
loop
=
(
EventLoop
*
)
loopHandle
;
loop
->
addEvent
(
loop
,
(
const
BaseTask
*
)
task
,
Event_Read
);
*
taskHandle
=
(
TaskHandle
)
task
;
...
...
@@ -225,7 +225,7 @@ LE_STATUS LE_AcceptStreamClient(const LoopHandle loopHandle, const TaskHandle se
return
LE_NO_MEMORY
,
"Failed to create task"
);
task
->
stream
.
base
.
handleEvent
=
HandleStreamEvent_
;
task
->
stream
.
base
.
innerClose
=
HandleStreamTaskClose_
;
task
->
disConn
tectComplete
=
info
->
disConnt
ectComplete
;
task
->
disConn
ectComplete
=
info
->
disConn
ectComplete
;
task
->
sendMessageComplete
=
info
->
sendMessageComplete
;
task
->
recvMessage
=
info
->
recvMessage
;
task
->
serverTask
=
(
StreamServerTask
*
)
server
;
...
...
services/loopevent/task/le_task.h
浏览文件 @
7815064b
...
...
@@ -91,12 +91,12 @@ typedef struct {
StreamServerTask
*
serverTask
;
LE_SendMessageComplete
sendMessageComplete
;
LE_RecvMessage
recvMessage
;
LE_DisConntectComplete
disConn
t
ectComplete
;
LE_DisConntectComplete
disConnectComplete
;
}
StreamConnectTask
;
typedef
struct
{
StreamTask
stream
;
LE_DisConntectComplete
disConn
t
ectComplete
;
LE_DisConntectComplete
disConnectComplete
;
LE_ConntectComplete
connectComplete
;
LE_SendMessageComplete
sendMessageComplete
;
LE_RecvMessage
recvMessage
;
...
...
services/param/linux/param_msgadp.c
浏览文件 @
7815064b
...
...
@@ -69,7 +69,7 @@ int ParamStreamCreate(ParamTaskPtr *stream, ParamTaskPtr server,
info
.
baseInfo
.
flags
|=
TASK_TEST
;
}
info
.
baseInfo
.
close
=
streamInfo
->
close
;
info
.
disConn
t
ectComplete
=
NULL
;
info
.
disConnectComplete
=
NULL
;
info
.
sendMessageComplete
=
NULL
;
info
.
recvMessage
=
OnReceiveRequest
;
g_recvMessage
=
streamInfo
->
recvMessage
;
...
...
services/utils/init_utils.c
浏览文件 @
7815064b
...
...
@@ -545,7 +545,7 @@ const static InitArgInfo g_servieStatusMap[] = {
{
"suspended"
,
SERVICE_SUSPENDED
},
{
"freezed"
,
SERVICE_FREEZED
},
{
"disabled"
,
SERVICE_DISABLED
},
{
"criti
al"
,
SERVICE_CRITI
AL
}
{
"criti
cal"
,
SERVICE_CRITIC
AL
}
};
const
InitArgInfo
*
GetServieStatusMap
(
int
*
size
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录