Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
32a91740
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
32a91740
编写于
9月 09, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1189 增加send result
Merge pull request !1189 from cheng_jinsong/timeout
上级
4027ec2e
43caf307
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
0 deletion
+9
-0
services/loopevent/include/loop_event.h
services/loopevent/include/loop_event.h
+1
-0
services/loopevent/task/le_streamtask.c
services/loopevent/task/le_streamtask.c
+1
-0
services/loopevent/task/le_task.c
services/loopevent/task/le_task.c
+6
-0
services/loopevent/task/le_task.h
services/loopevent/task/le_task.h
+1
-0
未找到文件。
services/loopevent/include/loop_event.h
浏览文件 @
32a91740
...
...
@@ -76,6 +76,7 @@ BufferHandle LE_CreateBuffer(const LoopHandle loopHandle, uint32_t bufferSize);
void
LE_FreeBuffer
(
const
LoopHandle
loopHandle
,
const
TaskHandle
taskHandle
,
const
BufferHandle
handle
);
uint8_t
*
LE_GetBufferInfo
(
const
BufferHandle
handle
,
uint32_t
*
dataSize
,
uint32_t
*
buffSize
);
void
*
LE_GetUserData
(
const
TaskHandle
handle
);
int32_t
LE_GetSendResult
(
const
BufferHandle
handle
);
typedef
void
(
*
LE_Close
)(
const
TaskHandle
taskHandle
);
typedef
struct
{
...
...
services/loopevent/task/le_streamtask.c
浏览文件 @
32a91740
...
...
@@ -30,6 +30,7 @@ static LE_STATUS HandleSendMsg_(const LoopHandle loopHandle,
while
(
buffer
)
{
int
ret
=
write
(
GetSocketFd
(
taskHandle
),
buffer
->
data
,
buffer
->
dataSize
);
LE_LOGV
(
"HandleSendMsg_ fd:%d send data size %d %d"
,
GetSocketFd
(
taskHandle
),
buffer
->
dataSize
,
ret
);
buffer
->
result
=
(
ret
==
buffer
->
dataSize
)
?
0
:
errno
;
if
(
complete
!=
NULL
)
{
complete
(
taskHandle
,
buffer
);
}
...
...
services/loopevent/task/le_task.c
浏览文件 @
32a91740
...
...
@@ -202,4 +202,10 @@ void *LE_GetUserData(TaskHandle handle)
LE_CHECK
(
handle
!=
NULL
,
return
NULL
,
"Invalid handle"
);
BaseTask
*
stream
=
(
BaseTask
*
)
handle
;
return
(
void
*
)(((
char
*
)
stream
)
+
stream
->
userDataOffset
);
}
int32_t
LE_GetSendResult
(
const
BufferHandle
handle
)
{
LE_CHECK
(
handle
!=
NULL
,
return
0
,
"Invalid handle"
);
return
((
LE_Buffer
*
)
handle
)
->
result
;
}
\ No newline at end of file
services/loopevent/task/le_task.h
浏览文件 @
32a91740
...
...
@@ -44,6 +44,7 @@ typedef struct {
ListNode
node
;
uint32_t
buffSize
;
uint32_t
dataSize
;
int32_t
result
;
uint8_t
data
[
0
];
}
LE_Buffer
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录