FACT++  1.0
void ServiceList::DumpServiceList ( std::ostream &  out)
static

Request a SERVER_LIST from the name server and a SERVICE_LIST from all servers in the list. Dumps the result to the given ostream.

Parameters
outostream to which the received info is redirected

Definition at line 684 of file ServiceList.cc.

References buffer, DimCurrentInfo::getString(), and kBold.

685 {
686  DimCurrentInfo info1("DIS_DNS/SERVER_LIST", const_cast<char*>(""));
687 
688  stringstream stream(info1.getString());
689 
690  string buffer;
691  while (getline(stream, buffer, '|'))
692  {
693  const string server = buffer.substr(0, buffer.find_first_of('@'));
694  if (server.empty())
695  continue;
696 
697  out << kBold << " " << server << endl;
698 
699  DimCurrentInfo info2((server+"/SERVICE_LIST").c_str(), const_cast<char*>(""));
700 
701  string buffer2;
702 
703  stringstream stream2(info2.getString());
704  while (getline(stream2, buffer2, '\n'))
705  {
706  if (buffer2.empty())
707  continue;
708 
709  out << " " << buffer2 << endl;
710  }
711  }
712 }
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
Set attribute Bold.
Definition: WindowLog.h:36

+ Here is the call graph for this function: