From 84aa803abcfe093ef06e8262cfdbc540b71ba5f5 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 23 Mar 2001 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2001-03-23 --- ip/tcp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ip/tcp.c b/ip/tcp.c index be3340bebd988ce1dbfb3d222ad24803c2c9a161..2c03b6feae3eecde393f10a55a8bab308e654c8c 100644 --- a/ip/tcp.c +++ b/ip/tcp.c @@ -953,6 +953,7 @@ sndrst(Proto *tcp, uchar *source, uchar *dest, ushort length, Tcp *seg) /* * send a reset to the remote side and close the conversation + * called with s qlocked */ char* tcphangup(Conv *s) @@ -963,11 +964,8 @@ tcphangup(Conv *s) Block *hbp; tcb = (Tcpctl*)s->ptcl; - if(waserror()){ - qunlock(s); + if(waserror()) return commonerror(); - } - qlock(s); if(s->raddr != 0) { seg.flags = RST | ACK; seg.ack = tcb->rcv.nxt; @@ -982,7 +980,6 @@ tcphangup(Conv *s) } localclose(s, nil); poperror(); - qunlock(s); return nil; } @@ -2215,7 +2212,7 @@ tcpadvise(Proto *tcp, Block *bp, char *msg) freeblist(bp); } -/* called with c->car qlocked */ +/* called with c qlocked */ char* tcpctl(Conv* c, char** f, int n) {