FACT++  1.0
void dis_set_quality ( unsigned  serv_id,
int  quality 
)

Definition at line 1928 of file dis.c.

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

Referenced by dis_hash_print().

1929 {
1930  register SERVICE *servp;
1931  char str[128];
1932 
1933  DISABLE_AST
1934  if(!serv_id)
1935  {
1936  sprintf(str,"Set Quality - Invalid service id");
1937  error_handler(0, DIM_ERROR, DIMSVCINVAL, str, -1);
1938  ENABLE_AST
1939  return;
1940  }
1941  servp = (SERVICE *)id_get_ptr(serv_id, SRC_DIS);
1942  if(!servp)
1943  {
1944  ENABLE_AST
1945  return;
1946  }
1947  if(servp->id != (int)serv_id)
1948  {
1949  ENABLE_AST
1950  return;
1951  }
1952  servp->quality = quality;
1953  ENABLE_AST
1954 }
static void error_handler(int conn_id, int severity, int errcode, char *reason, int exit)
Definition: dis.c:3199
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
#define DIMSVCINVAL
Definition: dim_common.h:290
int serv_id
Definition: demo_server.c:5
sprintf(name1,"NewService%d", i)
int quality
Definition: dis.c:82
int id
Definition: dis.c:73

+ Here is the call graph for this function:

+ Here is the caller graph for this function: