FACT++  1.0
char ** DimClient::getServerServices ( )
static

Definition at line 1319 of file diccpp.cxx.

References data, dic_get_conn_id(), dic_get_server_services(), TokenString::getNTokens(), TokenString::getToken(), and id.

Referenced by ErrorHandler::errorHandler(), and StrService::infoHandler().

1320 {
1321  static TokenString *data = 0;
1322  int id, len = 0, index = 0;
1323  char *services;
1324  static char** list = 0;
1325  char *sep;
1326 
1327  if(data)
1328  {
1329  delete data;
1330  data = 0;
1331  }
1332  if(list)
1333  {
1334  delete[] list;
1335  list = 0;
1336  }
1337  if((id = dic_get_conn_id()))
1338  {
1339  services = dic_get_server_services(id);
1340  if(services)
1341  {
1342  data = new TokenString(services,(char *)"\n");
1343  len = data->getNTokens();
1344  list = new char*[len];
1345  while(data->getToken(list[index]))
1346  {
1347  data->getToken(sep);
1348  index++;
1349  }
1350  }
1351  }
1352  if(!len)
1353  list = new char*[1];
1354  list[index] = 0;
1355  return list;
1356 }
int getNTokens()
char id[4]
Definition: FITS.h:71
char * dic_get_server_services(int conn_id)
Definition: dic.c:2238
int getToken(char *&token)
float data[4 *1440]
int dic_get_conn_id()
Definition: dic.c:2300

+ Here is the call graph for this function:

+ Here is the caller graph for this function: