FACT++  1.0
void do_inform_clients ( int  conn_id)

Definition at line 942 of file dns.c.

References dll_empty(), dll_get_next(), Dns_conns, dtq_start_timer(), inform_clients(), serv::node_head, node::servp, and serv::state.

Referenced by handle_registration().

943 {
944  DNS_SERVICE *servp;
945  int n_informed = 0;
946  static DNS_SERVICE *prev_servp = (DNS_SERVICE *)0;
947  void inform_clients();
948 
949  DISABLE_AST
950  if(!Dns_conns[conn_id].service_head)
951  {
952  prev_servp = (DNS_SERVICE *)0;
953  ENABLE_AST
954  return;
955  }
956  if(prev_servp)
957  servp = prev_servp;
958  else
959  servp = (DNS_SERVICE *)Dns_conns[conn_id].service_head;
960  while( (servp = (DNS_SERVICE *) dll_get_next(
961  (DLL *) Dns_conns[conn_id].service_head,
962  (DLL *) servp)) )
963  {
964  if( servp->state != -1 )
965  {
966  if( !dll_empty((DLL *) servp->node_head))
967  {
968  inform_clients(servp);
969  n_informed++;
970  if(n_informed == 1000)
971  {
972  dtq_start_timer(0, do_inform_clients, conn_id);
973  ENABLE_AST
974  return;
975  }
976  }
977  }
978  }
979  prev_servp = (DNS_SERVICE *)0;
980  ENABLE_AST
981 }
void do_inform_clients(int conn_id)
Definition: dns.c:942
void inform_clients(DNS_SERVICE *servp)
Definition: dns.c:984
DllExp DIM_NOSHARE DNS_CONNECTION * Dns_conns
Definition: conn_handler.c:29
RED_NODE * node_head
Definition: dns.c:55
Definition: dim.h:530
void dtq_start_timer(int time, void(*user_routine)(), dim_long tag)
Definition: dtq.c:790
Definition: dis.c:69
int state
Definition: dns.c:51
int dll_empty(DLL *head)
Definition: dll.c:88
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function: