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
1697e90f
Unverified
Commit
1697e90f
authored
Feb 06, 2020
by
Ian Hattendorf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: variable and switch case scoping
parent
5b2cd755
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
src/transports/winhttp.c
+6
-9
No files found.
src/transports/winhttp.c
View file @
1697e90f
...
...
@@ -864,31 +864,28 @@ static int do_send_request(winhttp_stream *s, size_t len, bool chunked)
static
int
send_request
(
winhttp_stream
*
s
,
size_t
len
,
bool
chunked
)
{
int
request_failed
=
1
,
cert_valid
,
client_cert_requested
,
error
,
attempts
=
0
;
int
request_failed
=
1
,
error
,
attempts
=
0
;
DWORD
ignore_flags
,
send_request_error
;
git_error_clear
();
while
(
request_failed
&&
attempts
++
<
3
)
{
int
cert_valid
=
1
;
int
client_cert_requested
=
0
;
request_failed
=
0
;
cert_valid
=
1
;
client_cert_requested
=
0
;
if
((
error
=
do_send_request
(
s
,
len
,
chunked
))
<
0
)
{
send_request_error
=
GetLastError
();
request_failed
=
1
;
switch
(
send_request_error
)
{
case
ERROR_WINHTTP_SECURE_FAILURE
:
{
case
ERROR_WINHTTP_SECURE_FAILURE
:
cert_valid
=
0
;
break
;
}
case
ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED
:
{
case
ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED
:
client_cert_requested
=
1
;
break
;
}
default:
{
default:
git_error_set
(
GIT_ERROR_OS
,
"failed to send request"
);
return
-
1
;
}
}
}
...
...
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