Re: [PATCH] Emit Connect signal for LE capable devices

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

 



On 11/29/2010 07:52 AM, Johan Hedberg wrote:
Hi Sheldon,

On Thu, Nov 25, 2010, Sheldon Demario wrote:
+	if (le) {
+		evt_le_connection_complete *evt = ptr;
+		evt_bdaddr =&evt->peer_bdaddr;
+		evt_handle = evt->handle;
+		evt_status = evt->status;
+	}  else {
+		evt_conn_complete *evt = ptr;
+		evt_bdaddr =&evt->bdaddr;
+		evt_handle = evt->handle;
+		evt_status = evt->status;
+
+		if (evt->link_type != ACL_LINK)
+			return;
+	}
Instead of this kind of trickery, I have a feeling that the code would
be easier to read if you had a separate function for the LE connect
complete. Could try try to come up with a patch that does it like that?

For sure, but don't you think that doing this way there will be a lot of duplicated code?

Sheldon.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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