Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
9fa1ce1a
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
接近 2 年 前同步成功
通知
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看板
提交
9fa1ce1a
编写于
5月 05, 2022
作者:
L
laiguizhong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
隐藏不开放API符号
Signed-off-by:
N
laiguizhong
<
laiguizhong@huawei.com
>
上级
7850741d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
2 deletion
+14
-2
interfaces/innerkits/include/beget_ext.h
interfaces/innerkits/include/beget_ext.h
+9
-0
services/loopevent/socket/le_socket.c
services/loopevent/socket/le_socket.c
+2
-2
services/loopevent/socket/le_socket.h
services/loopevent/socket/le_socket.h
+3
-0
未找到文件。
interfaces/innerkits/include/beget_ext.h
浏览文件 @
9fa1ce1a
...
@@ -25,6 +25,15 @@ extern "C" {
...
@@ -25,6 +25,15 @@ extern "C" {
#ifndef INIT_LOG_PATH
#ifndef INIT_LOG_PATH
#define INIT_LOG_PATH "/data/init_agent/"
#define INIT_LOG_PATH "/data/init_agent/"
#endif
#endif
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define INIT_PUBLIC_API __attribute__((visibility ("default")))
#define INIT_LOCAL_API __attribute__((visibility("hidden")))
#else
#define INIT_PUBLIC_API
#define INIT_LOCAL_API
#endif
typedef
enum
InitLogLevel
{
typedef
enum
InitLogLevel
{
INIT_DEBUG
=
0
,
INIT_DEBUG
=
0
,
INIT_INFO
,
INIT_INFO
,
...
...
services/loopevent/socket/le_socket.c
浏览文件 @
9fa1ce1a
...
@@ -161,7 +161,7 @@ static int AcceptTcpSocket_(int serverFd)
...
@@ -161,7 +161,7 @@ static int AcceptTcpSocket_(int serverFd)
LE_LOGV
(
"AcceptTcpSocket_ client: %s "
,
inet_ntoa
(
clientAddr
.
sin_addr
));
LE_LOGV
(
"AcceptTcpSocket_ client: %s "
,
inet_ntoa
(
clientAddr
.
sin_addr
));
return
fd
;
return
fd
;
}
}
INIT_LOCAL_API
int
CreateSocket
(
int
flags
,
const
char
*
server
)
int
CreateSocket
(
int
flags
,
const
char
*
server
)
{
{
int
fd
=
-
1
;
int
fd
=
-
1
;
...
@@ -186,7 +186,7 @@ int CreateSocket(int flags, const char *server)
...
@@ -186,7 +186,7 @@ int CreateSocket(int flags, const char *server)
}
}
return
fd
;
return
fd
;
}
}
INIT_LOCAL_API
int
AcceptSocket
(
int
fd
,
int
flags
)
int
AcceptSocket
(
int
fd
,
int
flags
)
{
{
int
clientFd
=
-
1
;
int
clientFd
=
-
1
;
...
...
services/loopevent/socket/le_socket.h
浏览文件 @
9fa1ce1a
...
@@ -17,13 +17,16 @@
...
@@ -17,13 +17,16 @@
#define LE_SOCKET_H
#define LE_SOCKET_H
#include "le_utils.h"
#include "le_utils.h"
#include "loop_event.h"
#include "loop_event.h"
#include "beget_ext.h"
#ifdef __cplusplus
#ifdef __cplusplus
#if __cplusplus
#if __cplusplus
extern
"C"
{
extern
"C"
{
#endif
#endif
#endif
#endif
INIT_LOCAL_API
int
CreateSocket
(
int
flags
,
const
char
*
server
);
int
CreateSocket
(
int
flags
,
const
char
*
server
);
INIT_LOCAL_API
int
AcceptSocket
(
int
fd
,
int
flags
);
int
AcceptSocket
(
int
fd
,
int
flags
);
#ifdef __cplusplus
#ifdef __cplusplus
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录