Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5a7ad1f0
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5a7ad1f0
编写于
8月 20, 2016
作者:
R
Rich Salz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move BIO index lock creation
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
6b1f413c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
6 deletion
+18
-6
crypto/bio/b_addr.c
crypto/bio/b_addr.c
+1
-3
crypto/bio/bio_err.c
crypto/bio/bio_err.c
+1
-0
crypto/bio/bio_lib.c
crypto/bio/bio_lib.c
+1
-1
crypto/bio/bio_meth.c
crypto/bio/bio_meth.c
+14
-2
include/openssl/bio.h
include/openssl/bio.h
+1
-0
未找到文件。
crypto/bio/b_addr.c
浏览文件 @
5a7ad1f0
...
...
@@ -19,7 +19,6 @@
#include <ctype.h>
CRYPTO_RWLOCK
*
bio_lookup_lock
;
extern
CRYPTO_RWLOCK
*
bio_type_lock
;
static
CRYPTO_ONCE
bio_lookup_init
=
CRYPTO_ONCE_STATIC_INIT
;
/*
...
...
@@ -606,8 +605,7 @@ static int addrinfo_wrap(int family, int socktype,
DEFINE_RUN_ONCE_STATIC
(
do_bio_lookup_init
)
{
bio_lookup_lock
=
CRYPTO_THREAD_lock_new
();
bio_type_lock
=
CRYPTO_THREAD_lock_new
();
return
bio_lookup_lock
!=
NULL
&&
bio_type_lock
!=
NULL
;
return
bio_lookup_lock
!=
NULL
;
}
/*-
...
...
crypto/bio/bio_err.c
浏览文件 @
5a7ad1f0
...
...
@@ -29,6 +29,7 @@ static ERR_STRING_DATA BIO_str_functs[] = {
{
ERR_FUNC
(
BIO_F_BIO_CTRL
),
"BIO_ctrl"
},
{
ERR_FUNC
(
BIO_F_BIO_GETS
),
"BIO_gets"
},
{
ERR_FUNC
(
BIO_F_BIO_GET_HOST_IP
),
"BIO_get_host_ip"
},
{
ERR_FUNC
(
BIO_F_BIO_GET_NEW_INDEX
),
"BIO_get_new_index"
},
{
ERR_FUNC
(
BIO_F_BIO_GET_PORT
),
"BIO_get_port"
},
{
ERR_FUNC
(
BIO_F_BIO_LISTEN
),
"BIO_listen"
},
{
ERR_FUNC
(
BIO_F_BIO_LOOKUP
),
"BIO_lookup"
},
...
...
crypto/bio/bio_lib.c
浏览文件 @
5a7ad1f0
...
...
@@ -594,7 +594,7 @@ void bio_cleanup(void)
bio_sock_cleanup_int
();
CRYPTO_THREAD_lock_free
(
bio_lookup_lock
);
bio_lookup_lock
=
NULL
;
#endif
CRYPTO_THREAD_lock_free
(
bio_type_lock
);
bio_type_lock
=
NULL
;
#endif
}
crypto/bio/bio_meth.c
浏览文件 @
5a7ad1f0
...
...
@@ -8,14 +8,26 @@
*/
#include "bio_lcl.h"
#include <internal/thread_once.h>
CRYPTO_RWLOCK
*
bio_type_lock
;
static
int
bio_count
=
BIO_TYPE_START
;
CRYPTO_RWLOCK
*
bio_type_lock
=
NULL
;
static
CRYPTO_ONCE
bio_type_init
=
CRYPTO_ONCE_STATIC_INIT
;
DEFINE_RUN_ONCE_STATIC
(
do_bio_type_init
)
{
bio_type_lock
=
CRYPTO_THREAD_lock_new
();
return
bio_type_lock
!=
NULL
;
}
int
BIO_get_new_index
()
{
static
int
bio_count
=
BIO_TYPE_START
;
int
newval
;
if
(
!
RUN_ONCE
(
&
bio_type_init
,
do_bio_type_init
))
{
BIOerr
(
BIO_F_BIO_GET_NEW_INDEX
,
ERR_R_MALLOC_FAILURE
);
return
-
1
;
}
if
(
!
CRYPTO_atomic_add
(
&
bio_count
,
1
,
&
newval
,
bio_type_lock
))
return
-
1
;
return
newval
;
...
...
include/openssl/bio.h
浏览文件 @
5a7ad1f0
...
...
@@ -779,6 +779,7 @@ int ERR_load_BIO_strings(void);
# define BIO_F_BIO_CTRL 103
# define BIO_F_BIO_GETS 104
# define BIO_F_BIO_GET_HOST_IP 106
# define BIO_F_BIO_GET_NEW_INDEX 102
# define BIO_F_BIO_GET_PORT 107
# define BIO_F_BIO_LISTEN 139
# define BIO_F_BIO_LOOKUP 135
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录