FACT++  1.0
int end_command ( DIC_SERVICE servp,
int  ret 
)

Definition at line 1808 of file dic.c.

References dic_serv::conn_id, Dic_conns, dic_release_service(), locate_command(), move_to_cmnd_service(), dic_serv::pending, dic_serv::serv_id, dic_serv::serv_name, WAITING_CMND_ANSWER, and WAITING_DNS_UP.

Referenced by do_cmnd_callback(), request_command(), and send_service_command().

1809 {
1810  DIC_SERVICE *aux_servp;
1811  DIC_CONNECTION *dic_connp;
1812 
1813  DISABLE_AST
1814  dic_connp = &Dic_conns[servp->conn_id];
1815  if(servp->pending != WAITING_CMND_ANSWER)
1816  {
1817  if((!ret) || (!dic_connp->service_head))
1818  {
1819  servp->pending = WAITING_DNS_UP;
1820  dic_release_service( (unsigned)servp->serv_id );
1821  }
1822  else
1823  {
1824  aux_servp = locate_command(servp->serv_name);
1825  if( !aux_servp )
1826  {
1827  move_to_cmnd_service( servp );
1828  }
1829  else
1830  {
1831  if(aux_servp != servp)
1832  {
1833  servp->pending = WAITING_DNS_UP;
1834  dic_release_service( (unsigned)servp->serv_id );
1835  }
1836  }
1837  }
1838  }
1839  ENABLE_AST
1840  return(ret);
1841 }
DIM_NOSHARE DIC_CONNECTION * Dic_conns
Definition: conn_handler.c:30
DIC_SERVICE * locate_command(char *serv_name)
Definition: dic.c:1202
PENDING_STATES pending
Definition: dim.h:476
int conn_id
Definition: dim.h:475
Definition: dim.h:457
int serv_id
Definition: dim.h:461
void move_to_cmnd_service(DIC_SERVICE *servp)
Definition: dic.c:1639
char serv_name[MAX_NAME]
Definition: dim.h:460
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: