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
931c9805
Commit
931c9805
authored
Jan 14, 2007
by
Eric Wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zeroconf: avoid mixing declarations and code
git-svn-id:
https://svn.musicpd.org/mpd/trunk@5243
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
8a38b28e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
zeroconf.c
src/zeroconf.c
+19
-15
No files found.
src/zeroconf.c
View file @
931c9805
...
...
@@ -372,8 +372,9 @@ static int avahiFdset( fd_set* rfds, fd_set* wfds, fd_set* efds )
static
int
avahiFdconsume
(
int
fdCount
,
fd_set
*
rfds
,
fd_set
*
wfds
,
fd_set
*
efds
)
{
int
retval
=
fdCount
;
AvahiTimeout
*
t
;
AvahiWatch
*
w
=
avahiWatchList
;
while
(
w
!=
NULL
&&
retval
>
0
)
{
AvahiWatch
*
current
=
w
;
current
->
observedEvent
=
0
;
...
...
@@ -404,7 +405,7 @@ static int avahiFdconsume( int fdCount, fd_set* rfds, fd_set* wfds, fd_set* efds
}
}
AvahiTimeout
*
t
=
avahiTimeoutList
;
t
=
avahiTimeoutList
;
while
(
t
!=
NULL
&&
avahiRunning
)
{
AvahiTimeout
*
current
=
t
;
...
...
@@ -418,19 +419,8 @@ static int avahiFdconsume( int fdCount, fd_set* rfds, fd_set* wfds, fd_set* efds
return
retval
;
}
#endif // HAVE_AVAHI
void
initZeroconf
(
void
)
static
void
init_avahi
(
const
char
*
serviceName
)
{
const
char
*
serviceName
=
SERVICE_NAME
;
ConfigParam
*
param
;
param
=
getConfigParam
(
CONF_ZEROCONF_NAME
);
if
(
param
&&
strlen
(
param
->
value
)
>
0
)
serviceName
=
param
->
value
;
#if HAVE_AVAHI
int
error
;
DEBUG
(
"Avahi: Initializing interface
\n
"
);
...
...
@@ -468,7 +458,21 @@ void initZeroconf(void)
fail:
finishZeroconf
();
#endif // HAVE_AVAHI
}
#else
/* !HAVE_AVAHI */
static
void
init_avahi
(
const
char
*
serviceName
)
{
}
#endif
/* HAVE_AVAHI */
void
initZeroconf
(
void
)
{
const
char
*
serviceName
=
SERVICE_NAME
;
ConfigParam
*
param
;
param
=
getConfigParam
(
CONF_ZEROCONF_NAME
);
if
(
param
&&
strlen
(
param
->
value
)
>
0
)
serviceName
=
param
->
value
;
init_avahi
(
serviceName
);
}
void
finishZeroconf
(
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