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

Definition at line 1721 of file dis_old.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.

1722 {
1723  register REQUEST *reqp;
1724  register SERVICE *servp;
1725  char str[128];
1726 
1727  if(!service_id)
1728  {
1729  sprintf(str,"Get Timeout - Invalid service id");
1731  return(-1);
1732  }
1733  servp = (SERVICE *)id_get_ptr(service_id, SRC_DIS);
1734  if(!servp)
1735  {
1736  return(-1);
1737  }
1738  reqp = servp->request_head;
1739  while( (reqp = (REQUEST *) dll_get_next((DLL *)servp->request_head,
1740  (DLL *) reqp)) )
1741  {
1742  if(reqp->conn_id == client_id)
1743  return(reqp->timeout);
1744  }
1745  return(-1);
1746 }
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
static void error_handler(int conn_id, int severity, int errcode, char *reason)
Definition: dis_old.c:2827
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: