FACT++  1.0
void dis_stop_serving ( )

Definition at line 2091 of file dis_old.c.

References dim_stop_threads(), Dis_conn_id, Dis_first_time, dis_hash_service_get_next(), dis_init(), dis_remove_service(), Dis_timer_q, dna_close(), dtq_delete(), serv::id, and Serving.

Referenced by do_dis_stop_serving_dns(), and recv_dns_dis_rout().

2092 {
2093 register SERVICE *servp, *prevp;
2094 void dim_stop_threads(void);
2095 int hash_index;
2096 
2097  Serving = 0;
2098  dis_init();
2099  if(Dis_conn_id)
2100  {
2102  Dis_conn_id = 0;
2103  }
2104 /*
2105  if(Dns_dis_conn_id)
2106  {
2107  dna_close(Dns_dis_conn_id);
2108  Dns_dis_conn_id = 0;
2109  }
2110 */
2111  {
2112  DISABLE_AST
2113  prevp = 0;
2114  hash_index = -1;
2115  while( (servp = dis_hash_service_get_next(&hash_index, prevp, 0)) )
2116  {
2117  dis_remove_service(servp->id);
2118  prevp = 0;
2119  }
2120  ENABLE_AST
2121  }
2122 /*
2123  if(Dis_conn_id)
2124  dna_close(Dis_conn_id);
2125  if(Dns_dis_conn_id)
2126  dna_close(Dns_dis_conn_id);
2127  Dns_dis_conn_id = 0;
2128 */
2129  Dis_first_time = 1;
2130 /*
2131  if(Dns_timr_ent)
2132  {
2133  dtq_rem_entry(Dis_timer_q, Dns_timr_ent);
2134  Dns_timr_ent = NULL;
2135  }
2136 */
2138  Dis_timer_q = 0;
2139  dim_stop_threads();
2140 }
int dtq_delete(int queue_id)
Definition: dtq.c:378
static int Dis_timer_q
Definition: dis_old.c:141
SERVICE * dis_hash_service_get_next(int *curr_index, SERVICE *prevp, int new_entries)
Definition: dis_old.c:2920
int dna_close(int conn_id)
Definition: dna.c:835
static int Dis_first_time
Definition: dis_old.c:116
static void dis_init()
Definition: dis_old.c:216
Definition: dis.c:69
int dis_remove_service(unsigned service_id)
Definition: dis_old.c:1919
static int Serving
Definition: dis_old.c:124
static int Dis_conn_id
Definition: dis_old.c:122
void dim_stop_threads()
Definition: dim_thr.c:404
int id
Definition: dis.c:73

+ Here is the call graph for this function:

+ Here is the caller graph for this function: