[pulseaudio-discuss] [PATCH v3 6/7] bluetooth: Use static string in DBUS signal handler description
Frédéric Dalleau
frederic.dalleau at linux.intel.com
Tue Sep 20 04:55:25 PDT 2011
---
src/modules/bluetooth/module-bluetooth-device.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index a456167..0ba700d 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -2890,7 +2890,7 @@ int pa__init(pa_module* m) {
struct bluetooth_device *u;
const char *address, *path;
DBusError err;
- char *mike, *speaker, *transport;
+ char *mike, *speaker;
const pa_bluetooth_device *device;
pa_assert(m);
@@ -2970,19 +2970,17 @@ int pa__init(pa_module* m) {
speaker = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='SpeakerGainChanged',path='%s'", u->path);
mike = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='MicrophoneGainChanged',path='%s'", u->path);
- transport = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.MediaTransport',member='PropertyChanged'");
if (pa_dbus_add_matches(
pa_dbus_connection_get(u->connection), &err,
speaker,
mike,
- transport,
+ "type='signal',sender='org.bluez',interface='org.bluez.MediaTransport',member='PropertyChanged'",
"type='signal',sender='org.bluez',interface='org.bluez.HandsfreeGateway',member='PropertyChanged'",
NULL) < 0) {
pa_xfree(speaker);
pa_xfree(mike);
- pa_xfree(transport);
pa_log("Failed to add D-Bus matches: %s", err.message);
goto fail;
@@ -2990,7 +2988,6 @@ int pa__init(pa_module* m) {
pa_xfree(speaker);
pa_xfree(mike);
- pa_xfree(transport);
/* Connect to the BT service */
init_bt(u);
--
1.7.4.1
More information about the pulseaudio-discuss
mailing list