/[pengfork]/pengfork/src/p3/ack.c
ViewVC logotype

Diff of /pengfork/src/p3/ack.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by chupa, Mon Sep 9 22:59:42 2002 UTC revision 1.2 by chupa, Wed Sep 11 15:39:32 2002 UTC
# Line 41  p3_ack( header ) Line 41  p3_ack( header )
41        
42    nack_sent = 0;    nack_sent = 0;
43    if(header->type == TYPE_DATA)    if(header->type == TYPE_DATA)
44      srv.lastseq = header->seq;      {
45          srv.lastseq = header->seq;
46          if(p3_diff_seq(srv.lastseq,cli.lastack)>=8)
47            p3_put_packet(TYPE_ACK,NULL,0);
48        }
49    if(srv.lastack != header->ack)    if(srv.lastack != header->ack)
50      {      {
51        srv.lastack = header->ack;        srv.lastack = header->ack;
# Line 72  void Line 76  void
76  p3_send_nack(header)  p3_send_nack(header)
77       struct p3hdr *header;       struct p3hdr *header;
78  {  {
79    if(header->seq > srv.lastseq)    if(header->type == TYPE_PING)
80      {      {
81        nack_sent++;        p3_put_packet(TYPE_ACK,NULL,0);
82        if(nack_sent > 8) nack_sent=0;        p3_put_packet(TYPE_NACK,NULL,0);
83        if(!nack_sent)        nack_sent=1;
84          {      }
85          p3_put_packet(TYPE_NACK,NULL,0);    if(!nack_sent)
86          }      {
87          p3_put_packet(TYPE_NACK,NULL,0);
88          nack_sent=1;      
89      }      }
90  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26