Hi Johan, On Wed, Jun 20, 2012 at 12:35 PM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote: > Also, the RFCOMM server socket code in the kernel should already give an > error if binding to the same channel is attempted twice, so this would > look like a bug in one of the DUN implementations that they do not > unregister their service record when binding the server socket fails. So > simply fixing this bug would also make sure that two service records > aren't present (though it would remove the existence of the clueless > admin ;) Good point, and should actually work for L2CAP as well, apparently __rfcomm_get_sock_by_addr don't check BDADDR_ANY: if (rfcomm_pi(sk)->channel == channel && !bacmp(&bt_sk(sk)->src, src)) break; So the question is, should we check in every adapter if there is listen socket for the given channel? This complicates a little bit more the code, the other option is to oFono don't do the socket management itself, this might be possible with org.bluez.Telephony, so just register an agent for DUN as it will be for HFP, bluetoothd takes care of handling the connection and authorization and when its done contact oFono. -- Luiz Augusto von Dentz -- 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