FACT++  1.0
static int fds_get_entry ( fd_set *  fds,
int *  conn_id 
)
static

Definition at line 570 of file tcpip.c.

References Curr_N_Conns, Dna_conns, i, and Net_conns.

Referenced by io_sig_handler(), and tcpip_task().

571 {
572  int i;
573 
574 #ifdef __linux__
575  int index = *conn_id;
576  if(fds) {}
577  index++;
578  for( i = index; i < Pollfd_size; i++ )
579  {
580  if( Dna_conns[i].busy && (
581  (Pollfds[i].revents & POLLIN) || (Pollfds[i].revents & POLLHUP) ) )
582  {
583  Pollfds[i].revents = 0;
584  if(Net_conns[i].channel)
585  {
586  *conn_id = i;
587  return 1;
588  }
589  }
590  }
591  return 0;
592 #else
593  for( i = 1; i < Curr_N_Conns; i++ )
594  {
595  if( Dna_conns[i].busy &&
596  FD_ISSET(Net_conns[i].channel, fds) )
597  {
598  if(Net_conns[i].channel)
599  {
600  *conn_id = i;
601  return 1;
602  }
603  }
604  }
605  return 0;
606 #endif
607 }
DllExp DIM_NOSHARE int Curr_N_Conns
Definition: conn_handler.c:33
int i
Definition: db_dim_client.c:21
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
Definition: conn_handler.c:32
DllExp DIM_NOSHARE DNA_CONNECTION * Dna_conns
Definition: conn_handler.c:31

+ Here is the caller graph for this function: