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
d67737bc
Commit
d67737bc
authored
Jun 03, 2007
by
Patrik Weiskircher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow zeroconf to be disabled.
git-svn-id:
https://svn.musicpd.org/mpd/trunk@6467
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
40254984
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
0 deletions
+18
-0
mpd.conf.5
doc/mpd.conf.5
+3
-0
mpdconf.example
doc/mpdconf.example
+4
-0
conf.c
src/conf.c
+1
-0
conf.h
src/conf.h
+1
-0
zeroconf.c
src/zeroconf.c
+9
-0
No files found.
doc/mpd.conf.5
View file @
d67737bc
...
@@ -71,6 +71,9 @@ reports from what address a connection is opened, and when it is closed, and
...
@@ -71,6 +71,9 @@ reports from what address a connection is opened, and when it is closed, and
"verbose" records excessive amounts of information for debugging purposes. The
"verbose" records excessive amounts of information for debugging purposes. The
default is "default".
default is "default".
.TP
.TP
.B zeroconf_enabled <yes or no>
Specifies if zeroconf should be enabled or not.
.TP
.B zeroconf_name <name>
.B zeroconf_name <name>
If Zerconf is compiled into MPD, this is the service name to publish. This
If Zerconf is compiled into MPD, this is the service name to publish. This
should be unique to your local network, but name collisions will be properly
should be unique to your local network, but name collisions will be properly
...
...
doc/mpdconf.example
View file @
d67737bc
...
@@ -45,6 +45,10 @@ error_file "~/.mpd/mpd.error"
...
@@ -45,6 +45,10 @@ error_file "~/.mpd/mpd.error"
#
#
#log_level "default"
#log_level "default"
#
#
# If Zeroconf support should be enabled.
#
#zeroconf_enabled "yes"
#
# If Zeroconf is configured, the service name to publish. This
# If Zeroconf is configured, the service name to publish. This
# should be unique on your local network, but name collisions
# should be unique on your local network, but name collisions
# will be taken care of for you.
# will be taken care of for you.
...
...
src/conf.c
View file @
d67737bc
...
@@ -145,6 +145,7 @@ void initConf(void)
...
@@ -145,6 +145,7 @@ void initConf(void)
registerConfigParam
(
CONF_PORT
,
0
,
0
);
registerConfigParam
(
CONF_PORT
,
0
,
0
);
registerConfigParam
(
CONF_LOG_LEVEL
,
0
,
0
);
registerConfigParam
(
CONF_LOG_LEVEL
,
0
,
0
);
registerConfigParam
(
CONF_ZEROCONF_NAME
,
0
,
0
);
registerConfigParam
(
CONF_ZEROCONF_NAME
,
0
,
0
);
registerConfigParam
(
CONF_ZEROCONF_ENABLED
,
0
,
0
);
registerConfigParam
(
CONF_PASSWORD
,
1
,
0
);
registerConfigParam
(
CONF_PASSWORD
,
1
,
0
);
registerConfigParam
(
CONF_DEFAULT_PERMS
,
0
,
0
);
registerConfigParam
(
CONF_DEFAULT_PERMS
,
0
,
0
);
registerConfigParam
(
CONF_AUDIO_OUTPUT
,
1
,
1
);
registerConfigParam
(
CONF_AUDIO_OUTPUT
,
1
,
1
);
...
...
src/conf.h
View file @
d67737bc
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#define CONF_PORT "port"
#define CONF_PORT "port"
#define CONF_LOG_LEVEL "log_level"
#define CONF_LOG_LEVEL "log_level"
#define CONF_ZEROCONF_NAME "zeroconf_name"
#define CONF_ZEROCONF_NAME "zeroconf_name"
#define CONF_ZEROCONF_ENABLED "zeroconf_enabled"
#define CONF_PASSWORD "password"
#define CONF_PASSWORD "password"
#define CONF_DEFAULT_PERMS "default_permissions"
#define CONF_DEFAULT_PERMS "default_permissions"
#define CONF_AUDIO_OUTPUT "audio_output"
#define CONF_AUDIO_OUTPUT "audio_output"
...
...
src/zeroconf.c
View file @
d67737bc
...
@@ -549,6 +549,10 @@ void initZeroconf(void)
...
@@ -549,6 +549,10 @@ void initZeroconf(void)
{
{
const
char
*
serviceName
=
SERVICE_NAME
;
const
char
*
serviceName
=
SERVICE_NAME
;
ConfigParam
*
param
;
ConfigParam
*
param
;
int
enabled
=
getBoolConfigParam
(
CONF_ZEROCONF_ENABLED
);
if
(
enabled
!=
-
1
&&
enabled
!=
1
)
return
;
param
=
getConfigParam
(
CONF_ZEROCONF_NAME
);
param
=
getConfigParam
(
CONF_ZEROCONF_NAME
);
...
@@ -566,6 +570,11 @@ void initZeroconf(void)
...
@@ -566,6 +570,11 @@ void initZeroconf(void)
void
finishZeroconf
(
void
)
void
finishZeroconf
(
void
)
{
{
int
enabled
=
getBoolConfigParam
(
CONF_ZEROCONF_ENABLED
);
if
(
enabled
!=
-
1
&&
enabled
!=
1
)
return
;
#ifdef HAVE_AVAHI
#ifdef HAVE_AVAHI
DEBUG
(
"Avahi: Shutting down interface
\n
"
);
DEBUG
(
"Avahi: Shutting down interface
\n
"
);
deregisterIO
(
&
zeroConfIo
);
deregisterIO
(
&
zeroConfIo
);
...
...
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