patch-2.3.41 linux/net/khttpd/userspace.c
Next file: linux/net/khttpd/waitheaders.c
Previous file: linux/net/khttpd/sockets.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Sat Jan 22 11:54:58 2000
- Orig file:
v2.3.40/linux/net/khttpd/userspace.c
- Orig date:
Thu Aug 26 13:05:46 1999
diff -u --recursive --new-file v2.3.40/linux/net/khttpd/userspace.c linux/net/khttpd/userspace.c
@@ -181,8 +181,7 @@
static int AddSocketToAcceptQueue(struct socket *sock,const int Port)
{
struct open_request *req;
- struct sock *sk;
- struct tcp_opt *tp;
+ struct sock *sk, *nsk;
EnterFunction("AddSocketToAcceptQueue");
@@ -196,8 +195,7 @@
lock_sock(sk);
- if (sk->state != TCP_LISTEN ||
- sk->ack_backlog > sk->max_ack_backlog) /* To many pending requests */
+ if (sk->state != TCP_LISTEN || tcp_acceptq_is_full(sk))
{
release_sock(sk);
sock_put(sk);
@@ -213,20 +211,17 @@
return -1;
}
- req->sk = sock->sk;
+ nsk = sock->sk;
sock->sk = NULL;
sock->state = SS_UNCONNECTED;
req->class = &Dummy;
- write_lock_irq(&req->sk->callback_lock);
- req->sk->socket = NULL;
- req->sk->sleep = NULL;
- write_unlock_irq(&req->sk->callback_lock);
+ write_lock_irq(&nsk->callback_lock);
+ nsk->socket = NULL;
+ nsk->sleep = NULL;
+ write_unlock_irq(&nsk->callback_lock);
- tp =&(sk->tp_pinfo.af_tcp);
- sk->ack_backlog++;
-
- tcp_synq_queue(tp,req);
+ tcp_acceptq_queue(sk, req, nsk);
sk->data_ready(sk, 0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)