pike.git / lib / modules / SSL.pmod / Connection.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Connection.pike:925:   //! The packet with seqence number @expr{next_seq_num-1@} is   //! implicitly known to have been received.   private int sequence_mask = 0;      //! Check whether @[num] is a valid seqence number for a new packet.   int valid_seq_nump(int num)   {    if (num < next_seq_num-(window_size)) return 0;    if (num >= next_seq_num) return 1;    if (num == next_seq_num-1) return 0; -  return !(sequence_mask & (1<<(num + window_size - next_seq_num))); +  return !(sequence_mask & (1<<[int(0..)](num + window_size - next_seq_num)));   }      //! Mark seqence number @[num] as seen and accepted.   //!   //! This will cause @[valid_seq_nump()] to return @expr{0@} for it   //! if it shows up again.   void mark_seq_num(int num)   {    if (num < next_seq_num-(window_size)) return;    if (num == next_seq_num-1) return;    if (num < next_seq_num) { -  sequence_mask |= (1<<(num + window_size - next_seq_num)); +  sequence_mask |= (1<<[int(0..)](num + window_size - next_seq_num));    } else {    int delta = 1 + num - next_seq_num;    if (delta < window_size) { -  sequence_mask >>= delta; -  sequence_mask |= 1 << (window_size-(delta + 1)); +  sequence_mask >>= [int(1..)]delta; +  sequence_mask |= 1 << [int(0..)](window_size-(delta + 1));    } else {    sequence_mask = 0;    }    next_seq_num = num + 1;    }   }      void print_sequence_set()   {    werror("([ ");