Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
77fcad04
Commit
77fcad04
authored
18 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
fix for millisecond resolution timeouts
parent
e213555c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/socks.c
+4
-4
4 additions, 4 deletions
lib/socks.c
lib/tftp.c
+4
-2
4 additions, 2 deletions
lib/tftp.c
with
8 additions
and
6 deletions
lib/socks.c
+
4
−
4
View file @
77fcad04
...
...
@@ -343,14 +343,14 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
/* get timeout */
if
(
data
->
set
.
timeout
&&
data
->
set
.
connecttimeout
)
{
if
(
data
->
set
.
timeout
<
data
->
set
.
connecttimeout
)
timeout
=
data
->
set
.
timeout
*
1000
;
timeout
=
data
->
set
.
timeout
;
else
timeout
=
data
->
set
.
connecttimeout
*
1000
;
timeout
=
data
->
set
.
connecttimeout
;
}
else
if
(
data
->
set
.
timeout
)
timeout
=
data
->
set
.
timeout
*
1000
;
timeout
=
data
->
set
.
timeout
;
else
if
(
data
->
set
.
connecttimeout
)
timeout
=
data
->
set
.
connecttimeout
*
1000
;
timeout
=
data
->
set
.
connecttimeout
;
else
timeout
=
DEFAULT_CONNECT_TIMEOUT
;
...
...
This diff is collapsed.
Click to expand it.
lib/tftp.c
+
4
−
2
View file @
77fcad04
...
...
@@ -177,7 +177,8 @@ void tftp_set_timeouts(tftp_state_data_t *state)
time
(
&
state
->
start_time
);
if
(
state
->
state
==
TFTP_STATE_START
)
{
/* Compute drop-dead time */
maxtime
=
(
time_t
)(
data
->
set
.
connecttimeout
?
data
->
set
.
connecttimeout
:
30
);
maxtime
=
(
time_t
)(
data
->
set
.
connecttimeout
/
1000L
?
data
->
set
.
connecttimeout
/
1000L
:
30
);
state
->
max_time
=
state
->
start_time
+
maxtime
;
/* Set per-block timeout to total */
...
...
@@ -195,7 +196,8 @@ void tftp_set_timeouts(tftp_state_data_t *state)
else
{
/* Compute drop-dead time */
maxtime
=
(
time_t
)(
data
->
set
.
timeout
?
data
->
set
.
timeout
/
1000L
:
3600
);
maxtime
=
(
time_t
)(
data
->
set
.
timeout
/
1000L
?
data
->
set
.
timeout
/
1000L
:
3600
);
state
->
max_time
=
state
->
start_time
+
maxtime
;
/* Set per-block timeout to 10% of total */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment