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
add953fb
Commit
add953fb
authored
Jan 26, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/curl/Global: decouple from the IOThread library
parent
38542116
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Global.cxx
src/lib/curl/Global.cxx
+7
-7
No files found.
src/lib/curl/Global.cxx
View file @
add953fb
...
...
@@ -30,8 +30,8 @@
#include "config.h"
#include "Global.hxx"
#include "Request.hxx"
#include "IOThread.hxx"
#include "Log.hxx"
#include "event/Loop.hxx"
#include "event/SocketMonitor.hxx"
#include "util/RuntimeError.hxx"
#include "util/Domain.hxx"
...
...
@@ -112,7 +112,7 @@ CurlSocket::SocketFunction(gcc_unused CURL *easy,
auto
&
global
=
*
(
CurlGlobal
*
)
userp
;
CurlSocket
*
cs
=
(
CurlSocket
*
)
socketp
;
assert
(
io_thread_i
nside
());
assert
(
global
.
GetEventLoop
().
IsI
nside
());
if
(
action
==
CURL_POLL_REMOVE
)
{
delete
cs
;
...
...
@@ -120,7 +120,7 @@ CurlSocket::SocketFunction(gcc_unused CURL *easy,
}
if
(
cs
==
nullptr
)
{
cs
=
new
CurlSocket
(
global
,
io_thread_get
(),
s
);
cs
=
new
CurlSocket
(
global
,
global
.
GetEventLoop
(),
s
);
global
.
Assign
(
s
,
*
cs
);
}
else
{
#ifdef USE_EPOLL
...
...
@@ -145,7 +145,7 @@ CurlSocket::SocketFunction(gcc_unused CURL *easy,
bool
CurlSocket
::
OnSocketReady
(
unsigned
flags
)
{
assert
(
io_thread_i
nside
());
assert
(
GetEventLoop
().
IsI
nside
());
global
.
SocketAction
(
Get
(),
FlagsToCurlCSelect
(
flags
));
return
true
;
...
...
@@ -159,7 +159,7 @@ CurlSocket::OnSocketReady(unsigned flags)
void
CurlGlobal
::
Add
(
CURL
*
easy
,
CurlRequest
&
request
)
{
assert
(
io_thread_i
nside
());
assert
(
GetEventLoop
().
IsI
nside
());
assert
(
easy
!=
nullptr
);
curl_easy_setopt
(
easy
,
CURLOPT_PRIVATE
,
&
request
);
...
...
@@ -175,7 +175,7 @@ CurlGlobal::Add(CURL *easy, CurlRequest &request)
void
CurlGlobal
::
Remove
(
CURL
*
easy
)
{
assert
(
io_thread_i
nside
());
assert
(
GetEventLoop
().
IsI
nside
());
assert
(
easy
!=
nullptr
);
curl_multi_remove_handle
(
multi
.
Get
(),
easy
);
...
...
@@ -202,7 +202,7 @@ ToRequest(CURL *easy)
inline
void
CurlGlobal
::
ReadInfo
()
{
assert
(
io_thread_i
nside
());
assert
(
GetEventLoop
().
IsI
nside
());
CURLMsg
*
msg
;
int
msgs_in_queue
;
...
...
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