apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: apr/poll/os2 poll.c
Date Sat, 13 Jul 2002 07:11:20 GMT
bjh         2002/07/13 00:11:19

  Modified:    poll/os2 poll.c
  Log:
  Fix socket counts after a socket has been removed from the poll set.
  
  Revision  Changes    Path
  1.3       +5 -3      apr/poll/os2/poll.c
  
  Index: poll.c
  ===================================================================
  RCS file: /home/cvs/apr/poll/os2/poll.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- poll.c	11 Jul 2002 16:00:08 -0000	1.2
  +++ poll.c	13 Jul 2002 07:11:19 -0000	1.3
  @@ -65,9 +65,11 @@
       int pos_read, pos_write, pos_except;
   
       for (i = 0; i < num; i++) {
  -        num_read += (aprset[i].reqevents & APR_POLLIN) != 0;
  -        num_write += (aprset[i].reqevents & APR_POLLOUT) != 0;
  -        num_except += (aprset[i].reqevents & APR_POLLPRI) != 0;
  +        if (aprset[i].desc_type == APR_POLL_SOCKET) {
  +            num_read += (aprset[i].reqevents & APR_POLLIN) != 0;
  +            num_write += (aprset[i].reqevents & APR_POLLOUT) != 0;
  +            num_except += (aprset[i].reqevents & APR_POLLPRI) != 0;
  +        }
       }
   
       num_total = num_read + num_write + num_except;
  
  
  

Mime
View raw message