DBusConnection *conn;
unsigned i;
- if ((y = pa_shared_get(c, "bluetooth-discovery")))
- return pa_bluetooth_discovery_ref(y);
-
y = pa_xnew0(pa_bluetooth_discovery, 1);
PA_REFCNT_INIT(y);
y->core = c;
#include <pulsecore/modargs.h>
#include <pulsecore/poll.h>
#include <pulsecore/rtpoll.h>
+#include <pulsecore/shared.h>
#include <pulsecore/socket-util.h>
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
goto fail;
}
- if (!(u->discovery = pa_bluetooth_discovery_get(m->core)))
+ if ((u->discovery = pa_shared_get(u->core, "bluetooth-discovery")))
+ pa_bluetooth_discovery_ref(u->discovery);
+ else {
+ pa_log_error("module-bluez5-discover doesn't seem to be loaded, refusing to load module-bluez5-device");
goto fail;
+ }
if (!(u->device = pa_bluetooth_discovery_get_device_by_path(u->discovery, path))) {
pa_log_error("%s is unknown", path);