FACT++  1.0
int send_service_command ( DIC_SERVICE servp)

Definition at line 1843 of file dic.c.

References COMMAND, dic_serv::conn_id, dic_release_service(), end_command(), locate_command(), move_to_cmnd_service(), move_to_ok_service(), ONCE_ONLY, dic_serv::pending, request_dns_info(), send_command(), send_service(), dic_serv::serv_id, dic_serv::serv_name, dic_serv::type, and WAITING_DNS_UP.

Referenced by handle_dns_info().

1844 {
1845  int ret = 1;
1846  int conn_id;
1847  int send_command();
1848  int send_service();
1849 
1850  conn_id = servp->conn_id;
1851  if( servp->type == COMMAND )
1852  {
1853  ret = send_command(conn_id, servp);
1854  end_command(servp, ret);
1855  }
1856  else
1857  {
1858  if( send_service(conn_id, servp))
1859  {
1860  if( servp->type == ONCE_ONLY )
1861  {
1862  if( !locate_command(servp->serv_name) )
1863  {
1864  move_to_cmnd_service( servp );
1865  }
1866  }
1867  else
1868  move_to_ok_service( servp, conn_id );
1869  }
1870  else
1871  {
1872  if( servp->type == ONCE_ONLY )
1873  {
1874  servp->pending = WAITING_DNS_UP;
1875  dic_release_service( (unsigned)servp->serv_id );
1876  }
1877  else
1878  {
1879  servp->pending = WAITING_DNS_UP;
1880  servp->conn_id = 0;
1881 /*
1882  release_conn(conn_id);
1883 */
1884  request_dns_info(0);
1885  }
1886  }
1887  }
1888  return(ret);
1889 }
int end_command(DIC_SERVICE *servp, int ret)
Definition: dic.c:1808
int send_service(int conn_id, DIC_SERVICE *servp)
Definition: dic.c:1891
#define COMMAND
Definition: dim_common.h:10
DIC_SERVICE * locate_command(char *serv_name)
Definition: dic.c:1202
void move_to_ok_service(DIC_SERVICE *servp, int conn_id)
Definition: dic.c:1610
PENDING_STATES pending
Definition: dim.h:476
int type
Definition: dim.h:465
int conn_id
Definition: dim.h:475
int send_command(int conn_id, DIC_SERVICE *servp)
Definition: dic.c:1956
int serv_id
Definition: dim.h:461
static void request_dns_info(int id)
Definition: dic.c:1245
void move_to_cmnd_service(DIC_SERVICE *servp)
Definition: dic.c:1639
char serv_name[MAX_NAME]
Definition: dim.h:460
#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: