summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/bluetooth/socket
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-10-30 19:44:40 +0000
committerrwatson <rwatson@FreeBSD.org>2005-10-30 19:44:40 +0000
commit49831ed8da06ffadf684484671b4561c9ac55f9f (patch)
tree779e3d7a8028f1ac29696c62ad8b70ba7bc70d2e /sys/netgraph/bluetooth/socket
parent1d93f083bf03400439b86271732e2b3f17ba284c (diff)
downloadFreeBSD-src-49831ed8da06ffadf684484671b4561c9ac55f9f.zip
FreeBSD-src-49831ed8da06ffadf684484671b4561c9ac55f9f.tar.gz
Push the assignment of a new or updated so_qlimit from solisten()
following the protocol pru_listen() call to solisten_proto(), so that it occurs under the socket lock acquisition that also sets SO_ACCEPTCONN. This requires passing the new backlog parameter to the protocol, which also allows the protocol to be aware of changes in queue limit should it wish to do something about the new queue limit. This continues a move towards the socket layer acting as a library for the protocol. Bump __FreeBSD_version due to a change in the in-kernel protocol interface. This change has been tested with IPv4 and UNIX domain sockets, but not other protocols.
Diffstat (limited to 'sys/netgraph/bluetooth/socket')
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c4
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
index 1a25fb3..631e6a2 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
@@ -2406,7 +2406,7 @@ ng_btsocket_l2cap_disconnect(struct socket *so)
*/
int
-ng_btsocket_l2cap_listen(struct socket *so, struct thread *td)
+ng_btsocket_l2cap_listen(struct socket *so, int backlog, struct thread *td)
{
ng_btsocket_l2cap_pcb_p pcb = so2l2cap_pcb(so);
int error;
@@ -2427,7 +2427,7 @@ ng_btsocket_l2cap_listen(struct socket *so, struct thread *td)
error = EDESTADDRREQ;
goto out;
}
- solisten_proto(so);
+ solisten_proto(so, backlog);
out:
SOCK_UNLOCK(so);
return (error);
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
index 672c6fa..96478df 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
@@ -794,7 +794,7 @@ ng_btsocket_rfcomm_disconnect(struct socket *so)
*/
int
-ng_btsocket_rfcomm_listen(struct socket *so, struct thread *td)
+ng_btsocket_rfcomm_listen(struct socket *so, int backlog, struct thread *td)
{
ng_btsocket_rfcomm_pcb_p pcb = so2rfcomm_pcb(so);
ng_btsocket_rfcomm_session_p s = NULL;
@@ -858,7 +858,7 @@ ng_btsocket_rfcomm_listen(struct socket *so, struct thread *td)
goto out;
l2so = NULL;
}
- solisten_proto(so);
+ solisten_proto(so, backlog);
out:
SOCK_UNLOCK(so);
mtx_unlock(&ng_btsocket_rfcomm_sessions_mtx);
OpenPOWER on IntegriCloud