Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
9f5eddcd
Commit
9f5eddcd
authored
Jan 08, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/curl/Global: move code to UpdateTimeout()
parent
3cba7655
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
Global.cxx
src/lib/curl/Global.cxx
+14
-8
Global.hxx
src/lib/curl/Global.hxx
+1
-0
No files found.
src/lib/curl/Global.cxx
View file @
9f5eddcd
...
...
@@ -217,15 +217,12 @@ CurlGlobal::ReadInfo()
}
}
in
t
CurlGlobal
::
TimerFunction
(
gcc_unused
CURLM
*
_global
,
long
timeout_ms
,
void
*
userp
)
in
line
void
CurlGlobal
::
UpdateTimeout
(
long
timeout_ms
)
{
auto
&
global
=
*
(
CurlGlobal
*
)
userp
;
assert
(
_global
==
global
.
multi
.
Get
());
if
(
timeout_ms
<
0
)
{
global
.
Cancel
();
return
0
;
TimeoutMonitor
::
Cancel
();
return
;
}
if
(
timeout_ms
<
10
)
...
...
@@ -235,7 +232,16 @@ CurlGlobal::TimerFunction(gcc_unused CURLM *_global, long timeout_ms, void *user
of 10ms. */
timeout_ms
=
10
;
global
.
Schedule
(
std
::
chrono
::
milliseconds
(
timeout_ms
));
TimeoutMonitor
::
Schedule
(
std
::
chrono
::
milliseconds
(
timeout_ms
));
}
int
CurlGlobal
::
TimerFunction
(
gcc_unused
CURLM
*
_global
,
long
timeout_ms
,
void
*
userp
)
{
auto
&
global
=
*
(
CurlGlobal
*
)
userp
;
assert
(
_global
==
global
.
multi
.
Get
());
global
.
UpdateTimeout
(
timeout_ms
);
return
0
;
}
...
...
src/lib/curl/Global.hxx
View file @
9f5eddcd
...
...
@@ -76,6 +76,7 @@ public:
}
private
:
void
UpdateTimeout
(
long
timeout_ms
);
static
int
TimerFunction
(
CURLM
*
global
,
long
timeout_ms
,
void
*
userp
);
/* virtual methods from class TimeoutMonitor */
...
...
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