mirror of
https://github.com/reactos/reactos.git
synced 2024-09-13 14:22:22 +00:00
[TCPIP]
- Removed hack from lwIP code. Now the listening pcb is obtained in a way as to not affect pllute lwIP code. - Also there's still a little foreign code left in lwIP, but this can be easily removed as it contains no functional purpose, except debugging. svn path=/branches/GSoC_2011/TcpIpDriver/; revision=51924
This commit is contained in:
parent
f75011c71f
commit
a9d9b3583e
|
@ -163,14 +163,17 @@ TCPAcceptEventHandler(void *arg, struct tcp_pcb *newpcb)
|
|||
|
||||
if (Status == STATUS_SUCCESS)
|
||||
{
|
||||
DbgPrint("[IP, TCPAcceptEventHandler] newpcb->state = %s, newpcb->id = %d\n",
|
||||
tcp_state_str[newpcb->state], newpcb->identifier);
|
||||
DbgPrint("[IP, TCPAcceptEventHandler] newpcb->state = %s, listen_pcb->state = %s, newpcb->id = %d\n",
|
||||
tcp_state_str[newpcb->state],
|
||||
tcp_state_str[((struct tcp_pcb*)Connection->SocketContext)->state],
|
||||
newpcb->identifier);
|
||||
|
||||
LockObject(Bucket->AssociatedEndpoint, &OldIrql);
|
||||
Bucket->AssociatedEndpoint->SocketContext = newpcb;
|
||||
DbgPrint("[IP, TCPAcceptEventHandler] LibTCPAccept coming up\n");
|
||||
|
||||
LibTCPAccept(newpcb, Bucket->AssociatedEndpoint);
|
||||
LibTCPAccept(newpcb,
|
||||
(struct tcp_pcb*)Connection->SocketContext,
|
||||
Bucket->AssociatedEndpoint);
|
||||
|
||||
DbgPrint("[IP, TCPAcceptEventHandler] Trying to unlock Bucket->AssociatedEndpoint\n");
|
||||
UnlockObject(Bucket->AssociatedEndpoint, OldIrql);
|
||||
|
|
|
@ -530,8 +530,6 @@ tcp_listen_input(struct tcp_pcb_listen *pcb)
|
|||
/* inherit socket options */
|
||||
npcb->so_options = pcb->so_options & SOF_INHERITED;
|
||||
|
||||
npcb->listener = pcb;
|
||||
|
||||
/* Register the new PCB so that we can begin receiving segments
|
||||
for it. */
|
||||
TCP_REG(&tcp_active_pcbs, npcb);
|
||||
|
|
|
@ -278,7 +278,6 @@ struct tcp_pcb {
|
|||
/* KEEPALIVE counter */
|
||||
u8_t keep_cnt_sent;
|
||||
u16_t identifier;
|
||||
struct tcp_pcb_listen* listener;
|
||||
};
|
||||
|
||||
struct tcp_pcb_listen {
|
||||
|
|
|
@ -21,7 +21,7 @@ err_t LibTCPConnect(struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t port);
|
|||
err_t LibTCPClose(struct tcp_pcb *pcb);
|
||||
err_t LibTCPGetPeerName(struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t *port);
|
||||
err_t LibTCPGetHostName(struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t *port);
|
||||
void LibTCPAccept(struct tcp_pcb *pcb, void *arg);
|
||||
void LibTCPAccept(struct tcp_pcb *pcb, struct tcp_pcb *listen_pcb, void *arg);
|
||||
|
||||
/* IP functions */
|
||||
void LibIPInsertPacket(void *ifarg, void *data, u32_t size);
|
||||
|
|
|
@ -562,7 +562,7 @@ LibTCPClose(struct tcp_pcb *pcb)
|
|||
}
|
||||
|
||||
void
|
||||
LibTCPAccept(struct tcp_pcb *pcb, void *arg)
|
||||
LibTCPAccept(struct tcp_pcb *pcb, struct tcp_pcb *listen_pcb, void *arg)
|
||||
{
|
||||
DbgPrint("[LibTCPAccept] (pcb, arg) = (0x%x, 0x%x)\n", pcb, arg);
|
||||
|
||||
|
@ -573,7 +573,7 @@ LibTCPAccept(struct tcp_pcb *pcb, void *arg)
|
|||
tcp_sent(pcb, InternalSendEventHandler);
|
||||
tcp_arg(pcb, arg);
|
||||
|
||||
tcp_accepted(pcb->listener);
|
||||
tcp_accepted(listen_pcb);
|
||||
|
||||
DbgPrint("[LibTCPAccept] Done\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue