From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Mon, 21 Apr 2008 17:49:35 EDT." From: Bakul Shah Date: Mon, 21 Apr 2008 15:42:53 -0700 Message-Id: <20080421224253.5DCBB5B66@mail.bitblocks.com> Subject: Re: [9fans] telnet vs. godaddy whois Topicbox-Message-UUID: 974d5cec-ead3-11e9-9d60-3106f5b1d025 On Mon, 21 Apr 2008 17:49:35 EDT erik quanstrom wrote: > > I meant this: > > /* Pull out data to send */ > > bp = nil; > > if(dsize != 0) { > > bp = qcopy(s->wq, dsize, sent); > > if(BLEN(bp) != dsize) { > > seg.flags |= FIN; > > dsize--; > > } > > if(sent+dsize == sndcnt) > > seg.flags |= PSH; > > } > > > > Seems clearer to me. And equivalent! I have been running > > with this change since last Thursday. I don't stress my plan9 > > machine all that much but replica pulls, ftp, web browsing, > > nfs etc. have worked fine. > > i think they are not equivalent with these values > > BLEN(bp) != dsize > dsize == 1 > sent+0 == sndcnt I don't think all three conditions can be true. dsize is set to ssize, ssize is initialized to sndcnt - sent and after that it can only decrease. So if dsize is 1, sndcnt - send must be at least 1.