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
adf2d3af
Commit
adf2d3af
authored
Jun 03, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zeroconf/Avahi: move dbus_shutdown() call to the end of Main()
Calling dbus_shutdown() too early will break the "udisks2" neighbor plugin.
parent
32064a23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
Makefile.am
Makefile.am
+3
-0
Main.cxx
src/Main.cxx
+10
-0
ZeroconfAvahi.cxx
src/zeroconf/ZeroconfAvahi.cxx
+0
-4
No files found.
Makefile.am
View file @
adf2d3af
...
...
@@ -46,6 +46,7 @@ src_mpd_LDADD = \
$(STORAGE_LIBS)
\
$(PLAYLIST_LIBS)
\
$(AVAHI_LIBS)
\
$(DBUS_LIBS)
\
$(LIBWRAP_LDFLAGS)
\
$(SQLITE_LIBS)
\
$(DECODER_LIBS)
\
...
...
@@ -67,6 +68,8 @@ src_mpd_LDADD = \
libutil.a
\
$(SYSTEMD_DAEMON_LIBS)
src_mpd_CPPFLAGS
=
$(AM_CPPFLAGS)
$(DBUS_CFLAGS)
src_mpd_SOURCES
=
\
src/Main.cxx src/Main.hxx
...
...
src/Main.cxx
View file @
adf2d3af
...
...
@@ -101,6 +101,10 @@
#include <systemd/sd-daemon.h>
#endif
#ifdef ENABLE_DBUS
#include <dbus/dbus.h>
#endif
#include <stdlib.h>
#ifdef HAVE_LOCALE_H
...
...
@@ -713,6 +717,12 @@ try {
IcuFinish
();
log_deinit
();
#ifdef ENABLE_DBUS
/* free libdbus memory to make memory leak checkers happy */
dbus_shutdown
();
#endif
return
EXIT_SUCCESS
;
}
catch
(
const
std
::
exception
&
e
)
{
LogError
(
e
);
...
...
src/zeroconf/ZeroconfAvahi.cxx
View file @
adf2d3af
...
...
@@ -34,8 +34,6 @@
#include <avahi-common/malloc.h>
#include <avahi-common/error.h>
#include <dbus/dbus.h>
static
constexpr
Domain
avahi_domain
(
"avahi"
);
static
char
*
avahi_name
;
...
...
@@ -277,6 +275,4 @@ AvahiDeinit()
avahi_free
(
avahi_name
);
avahi_name
=
nullptr
;
dbus_shutdown
();
}
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