FACT++  1.0
char ** DimServer::getClientServices ( )
static
Examples:
logtime.cc.

Definition at line 601 of file discpp.cxx.

References data, dis_get_client_services(), dis_get_conn_id(), TokenString::getNTokens(), TokenString::getToken(), and id.

Referenced by CmndServ::commandHandler(), ErrorHandler::errorHandler(), and main().

602 {
603  static TokenString *data = 0;
604  int id, len = 0, index = 0;
605  char *services;
606  static char** list = 0;
607  char *sep;
608 
609  if(data)
610  {
611  delete data;
612  data = 0;
613  }
614  if(list)
615  {
616  delete[] list;
617  list = 0;
618  }
619  if((id = dis_get_conn_id()))
620  {
621  services = dis_get_client_services(id);
622  if(services)
623  {
624  data = new TokenString(services,(char *)"\n");
625  len = data->getNTokens();
626  list = new char*[len];
627  while(data->getToken(list[index]))
628  {
629  data->getToken(sep);
630  index++;
631  }
632  }
633  }
634  if(!len)
635  list = new char*[1];
636  list[index] = 0;
637  return list;
638 }
int getNTokens()
char id[4]
Definition: FITS.h:71
int dis_get_conn_id()
Definition: dis.c:2795
char * dis_get_client_services(int conn_id)
Definition: dis.c:2536
int getToken(char *&token)
float data[4 *1440]

+ Here is the call graph for this function:

+ Here is the caller graph for this function: