FACT++  1.0
void do_accept ( int  conn_id)

Definition at line 765 of file tcpip.c.

References NET_CONNECTION::last_used, NET_CONNECTION::mbx_channel, Net_conns, NET_CONNECTION::read_rout, TCPIP, and time.

Referenced by io_sig_handler(), and tcpip_task().

766 {
767  /* There is a 'connect' pending, serve it.
768  */
769  struct sockaddr_in other;
770  int othersize;
771 
772  othersize = sizeof(other);
773  memset( (char *) &other, 0, (size_t)othersize );
774  Net_conns[conn_id].mbx_channel = (int)accept( Net_conns[conn_id].channel,
775  (struct sockaddr*)&other, (unsigned int *)&othersize );
776  if( Net_conns[conn_id].mbx_channel < 0 )
777  {
778  return;
779  }
780 /*
781  else
782  {
783  int all, a, b, c, d;
784  char *pall;
785 
786  all = other.sin_addr.s_addr;
787  pall = &all;
788  a = pall[0];
789  a &= 0x000000ff;
790  b = pall[1];
791  b &= 0x000000ff;
792  c = pall[2];
793  c &= 0x000000ff;
794  d = pall[3];
795  d &= 0x000000ff;
796 printf("TCPIP got %d.%d.%d.%d \n",
797  a,b,c,d);
798  if((a == 134) && (b == 79) && (c == 157) && (d == 40))
799  {
800  closesock(Net_conns[conn_id].mbx_channel);
801  return;
802  }
803  }
804 */
805 
806  Net_conns[conn_id].last_used = time(NULL);
807  Net_conns[conn_id].read_rout( Net_conns[conn_id].mbx_channel,
808  conn_id, TCPIP );
809 }
void(* read_rout)()
Definition: dim.h:400
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
Definition: conn_handler.c:32
#define TCPIP
Definition: dim.h:194
int mbx_channel
Definition: dim.h:399
time_t last_used
Definition: dim.h:414
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
Definition: smartfact.txt:92

+ Here is the caller graph for this function: