FACT++  1.0
int tcpip_start_listen ( int  conn_id,
void(*)()  ast_routine 
)

Definition at line 1308 of file tcpip.c.

References enable_sig(), FALSE, Net_conns, NET_CONNECTION::read_rout, NET_CONNECTION::reading, and NET_CONNECTION::size.

Referenced by ast_conn_h(), dna_open_server(), and web_open_server().

1309 {
1310  /* Install signal handler stuff on the socket, and record
1311  * some necessary information: we are NOT reading, thus
1312  * no size.
1313  */
1314 
1315  Net_conns[conn_id].read_rout = ast_routine;
1316  Net_conns[conn_id].size = -1;
1317  if(Net_conns[conn_id].reading == -1)
1318  {
1319  if(enable_sig( conn_id ) == -1)
1320  {
1321 #ifdef DEBUG
1322  printf("START_LISTEN - enable_sig returned -1\n");
1323 #endif
1324  return(0);
1325  }
1326  }
1327  Net_conns[conn_id].reading = FALSE;
1328  return(1);
1329 }
void(* read_rout)()
Definition: dim.h:400
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
Definition: conn_handler.c:32
int size
Definition: dim.h:402
#define FALSE
Definition: dim.h:136
static int enable_sig(int conn_id)
Definition: tcpip.c:355
int reading
Definition: dim.h:410

+ Here is the call graph for this function:

+ Here is the caller graph for this function: