ng_btsocket_sco.c (217320) | ng_btsocket_sco.c (218757) |
---|---|
1/* 2 * ng_btsocket_sco.c 3 */ 4 5/*- 6 * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7 * All rights reserved. 8 * --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * $Id: ng_btsocket_sco.c,v 1.2 2005/10/31 18:08:51 max Exp $ | 1/* 2 * ng_btsocket_sco.c 3 */ 4 5/*- 6 * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7 * All rights reserved. 8 * --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * $Id: ng_btsocket_sco.c,v 1.2 2005/10/31 18:08:51 max Exp $ |
31 * $FreeBSD: head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c 217320 2011-01-12 19:53:39Z mdf $ | 31 * $FreeBSD: head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c 218757 2011-02-16 21:29:13Z bz $ |
32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bitstring.h> 37#include <sys/domain.h> 38#include <sys/endian.h> 39#include <sys/errno.h> --- 5 unchanged lines hidden (view full) --- 45#include <sys/mbuf.h> 46#include <sys/mutex.h> 47#include <sys/protosw.h> 48#include <sys/queue.h> 49#include <sys/socket.h> 50#include <sys/socketvar.h> 51#include <sys/sysctl.h> 52#include <sys/taskqueue.h> | 32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bitstring.h> 37#include <sys/domain.h> 38#include <sys/endian.h> 39#include <sys/errno.h> --- 5 unchanged lines hidden (view full) --- 45#include <sys/mbuf.h> 46#include <sys/mutex.h> 47#include <sys/protosw.h> 48#include <sys/queue.h> 49#include <sys/socket.h> 50#include <sys/socketvar.h> 51#include <sys/sysctl.h> 52#include <sys/taskqueue.h> |
53 54#include <net/vnet.h> 55 |
|
53#include <netgraph/ng_message.h> 54#include <netgraph/netgraph.h> 55#include <netgraph/bluetooth/include/ng_bluetooth.h> 56#include <netgraph/bluetooth/include/ng_hci.h> 57#include <netgraph/bluetooth/include/ng_l2cap.h> 58#include <netgraph/bluetooth/include/ng_btsocket.h> 59#include <netgraph/bluetooth/include/ng_btsocket_sco.h> 60 --- 411 unchanged lines hidden (view full) --- 472 473 /* pcb is locked */ 474 475 /* 476 * First check the pending connections queue and if we have 477 * space then create new socket and set proper source address. 478 */ 479 | 56#include <netgraph/ng_message.h> 57#include <netgraph/netgraph.h> 58#include <netgraph/bluetooth/include/ng_bluetooth.h> 59#include <netgraph/bluetooth/include/ng_hci.h> 60#include <netgraph/bluetooth/include/ng_l2cap.h> 61#include <netgraph/bluetooth/include/ng_btsocket.h> 62#include <netgraph/bluetooth/include/ng_btsocket_sco.h> 63 --- 411 unchanged lines hidden (view full) --- 475 476 /* pcb is locked */ 477 478 /* 479 * First check the pending connections queue and if we have 480 * space then create new socket and set proper source address. 481 */ 482 |
480 if (pcb->so->so_qlen <= pcb->so->so_qlimit) | 483 if (pcb->so->so_qlen <= pcb->so->so_qlimit) { 484 CURVNET_SET(pcb->so->so_vnet); |
481 so1 = sonewconn(pcb->so, 0); | 485 so1 = sonewconn(pcb->so, 0); |
486 CURVNET_RESTORE(); 487 } |
|
482 483 if (so1 == NULL) { 484 status = 0x0d; /* Rejected due to limited resources */ 485 goto respond; 486 } 487 488 /* 489 * If we got here than we have created new socket. So complete --- 1488 unchanged lines hidden --- | 488 489 if (so1 == NULL) { 490 status = 0x0d; /* Rejected due to limited resources */ 491 goto respond; 492 } 493 494 /* 495 * If we got here than we have created new socket. So complete --- 1488 unchanged lines hidden --- |