patch-2.3.15 linux/net/irda/af_irda.c

Next file: linux/net/irda/irlan/irlan_eth.c
Previous file: linux/net/ipx/af_spx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.14/linux/net/irda/af_irda.c linux/net/irda/af_irda.c
@@ -498,10 +498,15 @@
 	struct sock *sk = sock->sk;
 	struct sock *newsk;
 	struct sk_buff *skb;
+	int err;
 
 	self = sk->protinfo.irda;
 	ASSERT(self != NULL, return -1;);
 
+	err = irda_create(newsock, sk->protocol);
+	if (err)
+		return err;
+
 	if (sock->state != SS_UNCONNECTED)
 		return -EINVAL;
 
@@ -763,7 +768,7 @@
  *    
  *
  */
-static int irda_release(struct socket *sock, struct socket *peer)
+static int irda_release(struct socket *sock)
 {
 	struct sock *sk = sock->sk;
 	
@@ -1332,10 +1337,9 @@
 	irda_create
 };
 
-static struct proto_ops irda_stream_ops = {
+static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
 	PF_IRDA,
 	
-	sock_no_dup,
 	irda_release,
 	irda_bind,
 	irda_connect,
@@ -1350,13 +1354,13 @@
 	irda_getsockopt,
 	sock_no_fcntl,
 	irda_sendmsg,
-	irda_recvmsg_stream
+	irda_recvmsg_stream,
+	sock_no_mmap
 };
 
-static struct proto_ops irda_dgram_ops = {
+static struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
 	PF_IRDA,
 	
-	sock_no_dup,
 	irda_release,
 	irda_bind,
 	irda_connect,
@@ -1371,8 +1375,13 @@
 	irda_getsockopt,
 	sock_no_fcntl,
 	irda_sendmsg,
-	irda_recvmsg_dgram
+	irda_recvmsg_dgram,
+	sock_no_mmap
 };
+
+#include <linux/smp_lock.h>
+SOCKOPS_WRAP(irda_dgram, PF_IRDA);
+SOCKOPS_WRAP(irda_stream, PF_IRDA);
 
 /*
  * Function irda_device_event (this, event, ptr)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)