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
bf582bd9
Commit
bf582bd9
authored
Jul 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZeroconfGlue: use struct ConfigData
parent
ad866f7a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
Main.cxx
src/Main.cxx
+1
-1
ZeroconfGlue.cxx
src/zeroconf/ZeroconfGlue.cxx
+4
-4
ZeroconfGlue.hxx
src/zeroconf/ZeroconfGlue.hxx
+3
-2
No files found.
src/Main.cxx
View file @
bf582bd9
...
...
@@ -593,7 +593,7 @@ try {
instance
->
neighbors
->
Open
();
#endif
ZeroconfInit
(
instance
->
event_loop
);
ZeroconfInit
(
GetGlobalConfig
(),
instance
->
event_loop
);
for
(
auto
&
partition
:
instance
->
partitions
)
StartPlayerThread
(
partition
.
pc
);
...
...
src/zeroconf/ZeroconfGlue.cxx
View file @
bf582bd9
...
...
@@ -21,7 +21,7 @@
#include "ZeroconfGlue.hxx"
#include "ZeroconfAvahi.hxx"
#include "ZeroconfBonjour.hxx"
#include "config/
Global
.hxx"
#include "config/
Data
.hxx"
#include "config/Option.hxx"
#include "Listen.hxx"
#include "util/Domain.hxx"
...
...
@@ -40,11 +40,11 @@ static constexpr Domain zeroconf_domain("zeroconf");
static
int
zeroconfEnabled
;
void
ZeroconfInit
(
gcc_unused
EventLoop
&
loop
)
ZeroconfInit
(
const
ConfigData
&
config
,
gcc_unused
EventLoop
&
loop
)
{
const
char
*
serviceName
;
zeroconfEnabled
=
config
_get_b
ool
(
ConfigOption
::
ZEROCONF_ENABLED
,
zeroconfEnabled
=
config
.
GetB
ool
(
ConfigOption
::
ZEROCONF_ENABLED
,
DEFAULT_ZEROCONF_ENABLED
);
if
(
!
zeroconfEnabled
)
return
;
...
...
@@ -56,7 +56,7 @@ ZeroconfInit(gcc_unused EventLoop &loop)
return
;
}
serviceName
=
config
_get_s
tring
(
ConfigOption
::
ZEROCONF_NAME
,
serviceName
=
config
.
GetS
tring
(
ConfigOption
::
ZEROCONF_NAME
,
SERVICE_NAME
);
#ifdef HAVE_AVAHI
...
...
src/zeroconf/ZeroconfGlue.hxx
View file @
bf582bd9
...
...
@@ -22,12 +22,13 @@
#include "check.h"
struct
ConfigData
;
class
EventLoop
;
#ifdef HAVE_ZEROCONF
void
ZeroconfInit
(
EventLoop
&
loop
);
ZeroconfInit
(
const
ConfigData
&
config
,
EventLoop
&
loop
);
void
ZeroconfDeinit
();
...
...
@@ -35,7 +36,7 @@ ZeroconfDeinit();
#else
/* ! HAVE_ZEROCONF */
static
inline
void
ZeroconfInit
(
EventLoop
&
)
ZeroconfInit
(
const
ConfigData
&
,
EventLoop
&
)
{}
static
inline
void
...
...
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