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
b105093d
Commit
b105093d
authored
Oct 18, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZeroconfAvahi: convert avahiRunning to a "bool"
parent
d1c401fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ZeroconfAvahi.cxx
src/ZeroconfAvahi.cxx
+6
-6
No files found.
src/ZeroconfAvahi.cxx
View file @
b105093d
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
static
constexpr
Domain
avahi_domain
(
"avahi"
);
static
constexpr
Domain
avahi_domain
(
"avahi"
);
static
char
*
avahiName
;
static
char
*
avahiName
;
static
int
avahiR
unning
;
static
bool
avahi_r
unning
;
static
MyAvahiPoll
*
avahi_poll
;
static
MyAvahiPoll
*
avahi_poll
;
static
AvahiClient
*
avahiClient
;
static
AvahiClient
*
avahiClient
;
static
AvahiEntryGroup
*
avahiGroup
;
static
AvahiEntryGroup
*
avahiGroup
;
...
@@ -86,7 +86,7 @@ static void avahiGroupCallback(AvahiEntryGroup * g,
...
@@ -86,7 +86,7 @@ static void avahiGroupCallback(AvahiEntryGroup * g,
avahi_strerror
(
avahi_client_errno
avahi_strerror
(
avahi_client_errno
(
avahi_entry_group_get_client
(
g
))));
(
avahi_entry_group_get_client
(
g
))));
/* Some kind of failure happened while we were registering our services */
/* Some kind of failure happened while we were registering our services */
avahi
Running
=
0
;
avahi
_running
=
false
;
break
;
break
;
case
AVAHI_ENTRY_GROUP_UNCOMMITED
:
case
AVAHI_ENTRY_GROUP_UNCOMMITED
:
...
@@ -143,7 +143,7 @@ static void avahiRegisterService(AvahiClient * c)
...
@@ -143,7 +143,7 @@ static void avahiRegisterService(AvahiClient * c)
return
;
return
;
fail:
fail:
avahi
Running
=
0
;
avahi
_running
=
false
;
}
}
/* Callback when avahi changes state */
/* Callback when avahi changes state */
...
@@ -186,13 +186,13 @@ static void avahiClientCallback(AvahiClient * c, AvahiClientState state,
...
@@ -186,13 +186,13 @@ static void avahiClientCallback(AvahiClient * c, AvahiClientState state,
FormatWarning
(
avahi_domain
,
FormatWarning
(
avahi_domain
,
"Could not reconnect: %s"
,
"Could not reconnect: %s"
,
avahi_strerror
(
reason
));
avahi_strerror
(
reason
));
avahi
Running
=
0
;
avahi
_running
=
false
;
}
}
}
else
{
}
else
{
FormatWarning
(
avahi_domain
,
FormatWarning
(
avahi_domain
,
"Client failure: %s (terminal)"
,
"Client failure: %s (terminal)"
,
avahi_strerror
(
reason
));
avahi_strerror
(
reason
));
avahi
Running
=
0
;
avahi
_running
=
false
;
}
}
break
;
break
;
...
@@ -240,7 +240,7 @@ AvahiInit(EventLoop &loop, const char *serviceName)
...
@@ -240,7 +240,7 @@ AvahiInit(EventLoop &loop, const char *serviceName)
avahiName
=
avahi_strdup
(
serviceName
);
avahiName
=
avahi_strdup
(
serviceName
);
avahi
Running
=
1
;
avahi
_running
=
true
;
avahi_poll
=
new
MyAvahiPoll
(
loop
);
avahi_poll
=
new
MyAvahiPoll
(
loop
);
...
...
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