L2CAP: Change from SOCK_STREAM to SOCK_SEQPACKET.
This is the same as what FreeBSD does.
This commit is contained in:
@@ -341,7 +341,7 @@ l2cap_std_ops(int32 op, ...)
|
|||||||
new(&gL2capEndpointManager) L2capEndpointManager;
|
new(&gL2capEndpointManager) L2capEndpointManager;
|
||||||
|
|
||||||
error = gStackModule->register_domain_protocols(AF_BLUETOOTH,
|
error = gStackModule->register_domain_protocols(AF_BLUETOOTH,
|
||||||
SOCK_STREAM, BLUETOOTH_PROTO_L2CAP,
|
SOCK_SEQPACKET, BLUETOOTH_PROTO_L2CAP,
|
||||||
NET_BLUETOOTH_L2CAP_NAME, NULL);
|
NET_BLUETOOTH_L2CAP_NAME, NULL);
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ BluetoothServer::SDPServerThread(void* data)
|
|||||||
|
|
||||||
TRACE_BT("SDP: SDP server thread up...\n");
|
TRACE_BT("SDP: SDP server thread up...\n");
|
||||||
|
|
||||||
socketServer = socket(PF_BLUETOOTH, SOCK_STREAM, BLUETOOTH_PROTO_L2CAP);
|
socketServer = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BLUETOOTH_PROTO_L2CAP);
|
||||||
|
|
||||||
if (socketServer < 0) {
|
if (socketServer < 0) {
|
||||||
TRACE_BT("SDP: Could not create server socket ...\n");
|
TRACE_BT("SDP: Could not create server socket ...\n");
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ CreateL2capSocket(const bdaddr_t* bdaddr, struct sockaddr_l2cap& l2sa, uint16 ps
|
|||||||
/* Create the socket. */
|
/* Create the socket. */
|
||||||
printf("Creating socket ...\n");
|
printf("Creating socket ...\n");
|
||||||
|
|
||||||
sock = socket(PF_BLUETOOTH, SOCK_STREAM, BLUETOOTH_PROTO_L2CAP);
|
sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BLUETOOTH_PROTO_L2CAP);
|
||||||
if (sock < 0) {
|
if (sock < 0) {
|
||||||
perror ("socket");
|
perror ("socket");
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
|
|||||||
Reference in New Issue
Block a user