patch-2.3.15 linux/net/khttpd/misc.c

Next file: linux/net/khttpd/rfc.c
Previous file: linux/net/khttpd/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.14/linux/net/khttpd/misc.c linux/net/khttpd/misc.c
@@ -71,8 +71,6 @@
 	
 	if (sock->sk==NULL)
 		return;
-	if (sock->sk->state!=TCP_ESTABLISHED)
-		return;
 
 	len = 1;
 		
@@ -115,12 +113,8 @@
 	if ((Req->sock!=NULL)&&(Req->sock->sk!=NULL))
 	{
 		ReadRest(Req->sock);
-		lock_kernel();   /* 2.3.11 quirk - needed for 2.3.13 ?? */
-		lock_sock(Req->sock->sk);
 		remove_wait_queue(Req->sock->sk->sleep,&(Req->sleep));
-		release_sock(Req->sock->sk);
 	    	sock_release(Req->sock);
-	    	unlock_kernel();  /* 2.3.13 quirk */
 	}
 	
 	/* ... and the file-pointer ... */
@@ -170,16 +164,11 @@
 	
 	len = 0;
 	
-	if (sock->sk->state==TCP_ESTABLISHED)
-	{
-		oldfs = get_fs(); set_fs(KERNEL_DS);
-		len = sock_sendmsg(sock,&msg,(size_t)(Length-len));
-		set_fs(oldfs);
-		LeaveFunction("SendBuffer");
-		return len;	
-	}
-	else
-		return -ECONNRESET;
+	oldfs = get_fs(); set_fs(KERNEL_DS);
+	len = sock_sendmsg(sock,&msg,(size_t)(Length-len));
+	set_fs(oldfs);
+	LeaveFunction("SendBuffer");
+	return len;	
 }
 
 int SendBuffer_async(struct socket *sock, const char *Buffer,const size_t Length)

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