summaryrefslogtreecommitdiffstats
path: root/src/modules/bluetooth/module-bluetooth-device.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-01-06 11:02:16 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-01-06 11:02:16 -0300
commite7e6f86bbe0dda37e906ed31144b44a83327ee02 (patch)
tree0fbc436ebc0439a1aa388ea09a6554749865e56e /src/modules/bluetooth/module-bluetooth-device.c
parent1a96c9b0a6dceeeb1701703fef8bdb15572662cf (diff)
Fix sending wrong codec capability length.
Diffstat (limited to 'src/modules/bluetooth/module-bluetooth-device.c')
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 2546c694..cb4746a4 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -458,9 +458,12 @@ static int bt_setconf(struct userdata *u) {
strncpy(msg.setconf_req.device, u->addr, 18);
msg.setconf_req.codec.transport = u->transport;
- if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP)
+ if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
memcpy(&msg.setconf_req.codec, &u->a2dp.sbc_capabilities,
sizeof(u->a2dp.sbc_capabilities));
+ msg.setconf_req.h.length += msg.setconf_req.codec.length
+ - sizeof(msg.setconf_req.codec);
+ }
msg.setconf_req.access_mode = BT_CAPABILITIES_ACCESS_MODE_WRITE;
e = bt_audioservice_send(u->audioservice_fd, &msg.setconf_req.h);