FACT++  1.0
void dic_close_dns ( )

Definition at line 2142 of file dic.c.

References COMMAND, dic_release_service(), dll_get_next(), dna_close(), Dns_dic_conn_id, ONCE_ONLY, dic_serv::pending, dic_serv::prev, dic_serv::serv_id, dic_serv::serv_name, service_tmout(), dic_serv::type, WAITING_CMND_ANSWER, WAITING_DNS_UP, and WAITING_SERVER_UP.

Referenced by dic_stop(), Java_dim_DimClient_setDnsNode(), and DimClient::setDnsNode().

2143 {
2144  register DIC_SERVICE *servp, *auxp;
2145 
2146  if(Dns_dic_conn_id > 0)
2147  {
2148  if( (servp = (DIC_SERVICE *) Cmnd_head) )
2149  {
2150  while( (servp = (DIC_SERVICE *) dll_get_next(
2151  (DLL *) Cmnd_head,
2152  (DLL *) servp)) )
2153  {
2154 #ifdef DEBUG
2155  printf("\t%s was in the Command list\n", servp->serv_name);
2156  printf("type = %d, pending = %d\n",servp->type, servp->pending);
2157  fflush(stdout);
2158 #endif
2159  auxp = servp->prev;
2160  if( (servp->type == ONCE_ONLY ) &&
2161  (servp->pending == WAITING_SERVER_UP))
2162  {
2163  service_tmout( servp->serv_id );
2164  }
2165  else if( (servp->type == COMMAND ) &&
2166  (servp->pending == WAITING_CMND_ANSWER))
2167  {
2168  service_tmout( servp->serv_id );
2169  }
2170  else
2171  {
2172  servp->pending = WAITING_DNS_UP;
2173  dic_release_service( (unsigned)servp->serv_id );
2174  }
2175  servp = auxp;
2176  }
2177  }
2179  Dns_dic_conn_id = 0;
2180  }
2181 }
static int Dns_dic_conn_id
Definition: dic.c:46
#define COMMAND
Definition: dim_common.h:10
int dna_close(int conn_id)
Definition: dna.c:835
PENDING_STATES pending
Definition: dim.h:476
int type
Definition: dim.h:465
Definition: dim.h:530
struct dic_serv * prev
Definition: dim.h:459
static DIC_SERVICE * Cmnd_head
Definition: dic.c:42
Definition: dim.h:457
int serv_id
Definition: dim.h:461
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66
char serv_name[MAX_NAME]
Definition: dim.h:460
void service_tmout(int serv_id)
Definition: dic.c:518
#define ONCE_ONLY
Definition: dim_common.h:7
void dic_release_service(unsigned service_id)
Definition: dic.c:1025

+ Here is the call graph for this function:

+ Here is the caller graph for this function: