Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
2540487f
Commit
2540487f
authored
May 22, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3108 from libgit2/cmn/ssl-no-want
openssl: don't try to handle WANT_READ or WANT_WRITE
parents
ca183d27
77bffc2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
+5
-16
src/openssl_stream.c
+5
-16
No files found.
src/openssl_stream.c
View file @
2540487f
...
@@ -291,19 +291,14 @@ ssize_t openssl_write(git_stream *stream, const char *data, size_t len, int flag
...
@@ -291,19 +291,14 @@ ssize_t openssl_write(git_stream *stream, const char *data, size_t len, int flag
{
{
openssl_stream
*
st
=
(
openssl_stream
*
)
stream
;
openssl_stream
*
st
=
(
openssl_stream
*
)
stream
;
int
ret
;
int
ret
;
size_t
off
=
0
;
GIT_UNUSED
(
flags
);
GIT_UNUSED
(
flags
);
while
(
off
<
len
)
{
if
((
ret
=
SSL_write
(
st
->
ssl
,
data
,
len
))
<=
0
)
{
ret
=
SSL_write
(
st
->
ssl
,
data
+
off
,
len
-
off
);
return
ssl_set_error
(
st
->
ssl
,
ret
);
if
(
ret
<=
0
&&
ret
!=
SSL_ERROR_WANT_WRITE
)
}
return
ssl_set_error
(
st
->
ssl
,
ret
);
off
+=
ret
;
}
return
off
;
return
ret
;
}
}
ssize_t
openssl_read
(
git_stream
*
stream
,
void
*
data
,
size_t
len
)
ssize_t
openssl_read
(
git_stream
*
stream
,
void
*
data
,
size_t
len
)
...
@@ -311,14 +306,8 @@ ssize_t openssl_read(git_stream *stream, void *data, size_t len)
...
@@ -311,14 +306,8 @@ ssize_t openssl_read(git_stream *stream, void *data, size_t len)
openssl_stream
*
st
=
(
openssl_stream
*
)
stream
;
openssl_stream
*
st
=
(
openssl_stream
*
)
stream
;
int
ret
;
int
ret
;
do
{
if
((
ret
=
SSL_read
(
st
->
ssl
,
data
,
len
))
<=
0
)
ret
=
SSL_read
(
st
->
ssl
,
data
,
len
);
}
while
(
SSL_get_error
(
st
->
ssl
,
ret
)
==
SSL_ERROR_WANT_READ
);
if
(
ret
<
0
)
{
ssl_set_error
(
st
->
ssl
,
ret
);
ssl_set_error
(
st
->
ssl
,
ret
);
return
-
1
;
}
return
ret
;
return
ret
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment