summaryrefslogtreecommitdiff
path: root/sys/netbt/rfcomm_socket.c
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2008-02-24 21:34:49 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2008-02-24 21:34:49 +0000
commit0f57bfa559ae850def03153006105883b91d362e (patch)
treea7fb0a4d79aacf2db2bdf4eef6f744e5a9ecbf61 /sys/netbt/rfcomm_socket.c
parent98450358fa8b17b64cdf2ba62762e40965362f3c (diff)
Sync sys/netbt with NetBSD
ok deraadt@
Diffstat (limited to 'sys/netbt/rfcomm_socket.c')
-rw-r--r--sys/netbt/rfcomm_socket.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netbt/rfcomm_socket.c b/sys/netbt/rfcomm_socket.c
index 6484bb8cb32..72cb1e42c6c 100644
--- a/sys/netbt/rfcomm_socket.c
+++ b/sys/netbt/rfcomm_socket.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: rfcomm_socket.c,v 1.1 2007/06/01 02:46:12 uwe Exp $ */
-/* $NetBSD: rfcomm_socket.c,v 1.7 2007/04/21 06:15:23 plunky Exp $ */
+/* $OpenBSD: rfcomm_socket.c,v 1.2 2008/02/24 21:34:48 uwe Exp $ */
+/* $NetBSD: rfcomm_socket.c,v 1.8 2007/10/15 18:04:34 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,8 +32,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
#define PRUREQUESTS
@@ -131,18 +129,20 @@ rfcomm_usrreq(struct socket *up, int req, struct mbuf *m,
* Since we have nothing to add, we attach the DLC
* structure directly to our PCB pointer.
*/
- err = rfcomm_attach((struct rfcomm_dlc **)&up->so_pcb,
- &rfcomm_proto, up);
+ err = soreserve(up, rfcomm_sendspace, rfcomm_recvspace);
if (err)
return err;
- err = soreserve(up, rfcomm_sendspace, rfcomm_recvspace);
+ err = rfcomm_attach((struct rfcomm_dlc **)&up->so_pcb,
+ &rfcomm_proto, up);
if (err)
return err;
err = rfcomm_rcvd(up->so_pcb, sbspace(&up->so_rcv));
- if (err)
+ if (err) {
+ rfcomm_detach((struct rfcomm_dlc **)&up->so_pcb);
return err;
+ }
return 0;
}