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
0405a57f
Commit
0405a57f
authored
Feb 22, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zeroconf/avahi/Poll: make EventLoop the first parameter
parent
f29c69d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
Poll.cxx
src/zeroconf/avahi/Poll.cxx
+8
-10
No files found.
src/zeroconf/avahi/Poll.cxx
View file @
0405a57f
...
...
@@ -47,9 +47,9 @@ struct AvahiWatch final {
AvahiWatchEvent
received
;
public
:
AvahiWatch
(
SocketDescriptor
_fd
,
AvahiWatchEvent
_event
,
AvahiWatchCallback
_callback
,
void
*
_userdata
,
EventLoop
&
_loop
)
noexcept
AvahiWatch
(
EventLoop
&
_loop
,
SocketDescriptor
_fd
,
AvahiWatchEvent
_event
,
AvahiWatchCallback
_callback
,
void
*
_userdata
)
noexcept
:
event
(
_loop
,
BIND_THIS_METHOD
(
OnSocketReady
),
_fd
),
callback
(
_callback
),
userdata
(
_userdata
),
received
(
AvahiWatchEvent
(
0
))
{
...
...
@@ -84,9 +84,8 @@ struct AvahiTimeout final {
void
*
const
userdata
;
public
:
AvahiTimeout
(
const
struct
timeval
*
tv
,
AvahiTimeoutCallback
_callback
,
void
*
_userdata
,
EventLoop
&
_loop
)
noexcept
AvahiTimeout
(
EventLoop
&
_loop
,
const
struct
timeval
*
tv
,
AvahiTimeoutCallback
_callback
,
void
*
_userdata
)
noexcept
:
event
(
_loop
,
BIND_THIS_METHOD
(
OnTimeout
)),
callback
(
_callback
),
userdata
(
_userdata
)
{
if
(
tv
!=
nullptr
)
...
...
@@ -129,8 +128,8 @@ MyAvahiPoll::WatchNew(const AvahiPoll *api, int fd, AvahiWatchEvent event,
{
const
MyAvahiPoll
&
poll
=
*
(
const
MyAvahiPoll
*
)
api
;
return
new
AvahiWatch
(
SocketDescriptor
(
fd
),
event
,
callback
,
userdata
,
poll
.
event_loop
);
return
new
AvahiWatch
(
poll
.
event_loop
,
SocketDescriptor
(
fd
),
event
,
callback
,
userdata
);
}
AvahiTimeout
*
...
...
@@ -139,6 +138,5 @@ MyAvahiPoll::TimeoutNew(const AvahiPoll *api, const struct timeval *tv,
{
const
MyAvahiPoll
&
poll
=
*
(
const
MyAvahiPoll
*
)
api
;
return
new
AvahiTimeout
(
tv
,
callback
,
userdata
,
poll
.
event_loop
);
return
new
AvahiTimeout
(
poll
.
event_loop
,
tv
,
callback
,
userdata
);
}
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