FACT++  1.0
int dis_get_timeout ( unsigned  service_id,
int  client_id 
)

Definition at line 1901 of file dis.c.

References req_ent::conn_id, DIM_ERROR, DIMSVCINVAL, dll_get_next(), error_handler(), id_get_ptr(), serv::request_head, sprintf(), SRC_DIS, str, and req_ent::timeout.

Referenced by DimService::getTimeout(), and rpcin_routine().

1902 {
1903  register REQUEST *reqp;
1904  register SERVICE *servp;
1905  char str[128];
1906 
1907  if(!service_id)
1908  {
1909  sprintf(str,"Get Timeout - Invalid service id");
1910  error_handler(0, DIM_ERROR, DIMSVCINVAL, str, -1);
1911  return(-1);
1912  }
1913  servp = (SERVICE *)id_get_ptr(service_id, SRC_DIS);
1914  if(!servp)
1915  {
1916  return(-1);
1917  }
1918  reqp = servp->request_head;
1919  while( (reqp = (REQUEST *) dll_get_next((DLL *)servp->request_head,
1920  (DLL *) reqp)) )
1921  {
1922  if(reqp->conn_id == client_id)
1923  return(reqp->timeout);
1924  }
1925  return(-1);
1926 }
static void error_handler(int conn_id, int severity, int errcode, char *reason, int exit)
Definition: dis.c:3199
unsigned service_id
Definition: db_dim_client.c:22
char str[80]
Definition: test_client.c:7
void * id_get_ptr(int id, SRC_TYPES type)
Definition: conn_handler.c:184
Definition: dim.h:530
Definition: dis.c:69
REQUEST * request_head
Definition: dis.c:86
#define DIMSVCINVAL
Definition: dim_common.h:290
int timeout
Definition: dis.c:60
DLL * dll_get_next(DLL *head, DLL *item)
Definition: dll.c:66
int conn_id
Definition: dis.c:55
Definition: dis.c:52
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: