bluetooth-alsa: Connection fix for kernel >= 2.6.30

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

After trying to get bluetooth-alsa working on Ubuntu 11.10 (kernel
3.0.0) I realized that the struct sockaddr_l2 struct was changed in
kernel 2.6.30 to include a l2_cid variable. This variable is of course
not set in the a2dpd code which results in a socket connect() call
returning -EINVAL.

Simple fix is to memset struct before use. Patch is attached.
Unfortunately I don't have any idea where to send the patch, hope this
list isn't totally wrong.

/PH

--
Per-Henrik Lundblom           epost: ph@xxxxxxxxxxx
telefon: 0733-20 71 26        hemsida: www.whatever.nu

Index: a2dpd_tools.c
===================================================================
RCS file: /cvsroot/bluetooth-alsa/plugz/alsa-plugins/a2dpd/a2dpd_tools.c,v
retrieving revision 1.8
diff -u -r1.8 a2dpd_tools.c
--- a2dpd_tools.c	26 Jul 2007 13:33:54 -0000	1.8
+++ a2dpd_tools.c	1 Jan 2012 22:31:12 -0000
@@ -212,6 +212,7 @@
 	{
 		struct sockaddr_l2 sa;
 
+                memset(&sa, 0, sizeof(sa));
 		// create L2CAP connection
 		session->sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
 		session->local = 0;

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux