FACT++  1.0
int dis_get_timestamp ( unsigned  serv_id,
int *  secs,
int *  millisecs 
)

Definition at line 1831 of file dis_old.c.

References DIM_ERROR, DIMSVCINVAL, error_handler(), serv::id, id_get_ptr(), serv_id, sprintf(), SRC_DIS, str, serv::user_millisecs, and serv::user_secs.

Referenced by dis_hash_print().

1832 {
1833  register SERVICE *servp;
1834  char str[128];
1835 
1836  DISABLE_AST
1837  if(!serv_id)
1838  {
1839  sprintf(str,"Get Timestamp - Invalid service id");
1841  ENABLE_AST
1842  return(0);
1843  }
1844  servp = (SERVICE *)id_get_ptr(serv_id, SRC_DIS);
1845  if(!servp)
1846  {
1847  ENABLE_AST
1848  return(0);
1849  }
1850  if(servp->id != (int)serv_id)
1851  {
1852  ENABLE_AST
1853  return(0);
1854  }
1855  if(servp->user_secs)
1856  {
1857  *secs = servp->user_secs;
1858  *millisecs = servp->user_millisecs;
1859  }
1860  else
1861  {
1862  *secs = 0;
1863  *millisecs = 0;
1864  }
1865  ENABLE_AST
1866  return(1);
1867 }
int user_millisecs
Definition: dis.c:84
char str[80]
Definition: test_client.c:7
void * id_get_ptr(int id, SRC_TYPES type)
Definition: conn_handler.c:184
Definition: dis.c:69
int user_secs
Definition: dis.c:83
#define DIMSVCINVAL
Definition: dim_common.h:290
int serv_id
Definition: demo_server.c:5
static void error_handler(int conn_id, int severity, int errcode, char *reason)
Definition: dis_old.c:2827
sprintf(name1,"NewService%d", i)
int id
Definition: dis.c:73

+ Here is the call graph for this function:

+ Here is the caller graph for this function: