Skip to content

Commit

Permalink
Merge branch 'bluez5_unload_segfault' into 'master'
Browse files Browse the repository at this point in the history
Fix segfault when Bluetooth daemon disappears abruptly.

See merge request mer-core/pulseaudio!19
  • Loading branch information
Juho Hamalainen committed Jun 29, 2018
2 parents 9710e6a + 1037401 commit 943caf4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Expand Up @@ -32,8 +32,8 @@ AS_IF([! test -n "$VERSION"], [
AC_MSG_ERROR([git-version-gen failed])
])

m4_define(pa_major, `echo $VERSION | cut -d. -f1 | cut -d- -f1`)
m4_define(pa_minor, `echo $VERSION | cut -d. -f2 | cut -d- -f1`)
m4_define(pa_major, `echo $VERSION | cut -d. -f1 | cut -d- -f1 | cut -d+ -f1`)
m4_define(pa_minor, `echo $VERSION | cut -d. -f2 | cut -d- -f1 | cut -d+ -f1`)

AC_SUBST(PA_MAJOR, pa_major)
AC_SUBST(PA_MINOR, pa_minor)
Expand Down
2 changes: 1 addition & 1 deletion libpulse-mainloop-glib.pc.in
Expand Up @@ -5,7 +5,7 @@ includedir=@includedir@

Name: libpulse-mainloop-glib
Description: PulseAudio GLib 2.0 Main Loop Wrapper
Version: @PACKAGE_VERSION@
Version: @PA_MAJORMINOR@
Libs: -L${libdir} -lpulse-mainloop-glib @PTHREAD_LIBS@
Libs.private: -L${libdir}/pulseaudio -lpulsecommon-@PA_MAJORMINOR@
Cflags: -I${includedir} -D_REENTRANT
Expand Down
2 changes: 1 addition & 1 deletion rpm/pulseaudio.spec
Expand Up @@ -92,7 +92,7 @@ Makes PulseAudio a drop-in replacement for ESound.
%setup -q -n %{name}-%{version}

%build
echo "%{pulseversion}" > .tarball-version
echo "%{version}" > .tarball-version
NOCONFIGURE=1 ./bootstrap.sh

%ifarch %{arm}
Expand Down
6 changes: 3 additions & 3 deletions src/modules/bluetooth/bluez5-util.c
Expand Up @@ -1154,9 +1154,6 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
if (pa_streq(name, BLUEZ_SERVICE)) {
if (old_owner && *old_owner) {
pa_log_debug("Bluetooth daemon disappeared");
pa_hashmap_remove_all(y->devices);
pa_hashmap_remove_all(y->adapters);
y->objects_listed = false;
if (y->ofono_backend) {
pa_bluetooth_ofono_backend_free(y->ofono_backend);
y->ofono_backend = NULL;
Expand All @@ -1165,6 +1162,9 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
pa_bluetooth_native_backend_free(y->native_backend);
y->native_backend = NULL;
}
pa_hashmap_remove_all(y->devices);
pa_hashmap_remove_all(y->adapters);
y->objects_listed = false;
}

if (new_owner && *new_owner) {
Expand Down

0 comments on commit 943caf4

Please sign in to comment.