~mordred/gearmand/cancel-job

« back to all changes in this revision

Viewing changes to libtest/server_container.cc

  • Committer: Brian Aker
  • Date: 2012-05-04 03:46:04 UTC
  • Revision ID: brian@tangent.org-20120504034604-5t22ae4v2o45zjkq
Update for libtest, documentation, and fix for root bzr dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
  return tmp;
92
92
}
93
93
 
94
 
bool server_startup_st::shutdown(uint32_t number_of_host)
 
94
// host_to_shutdown => host number to shutdown in array
 
95
bool server_startup_st::shutdown(uint32_t host_to_shutdown)
95
96
{
96
 
  if (servers.size() > number_of_host)
 
97
  if (servers.size() > host_to_shutdown)
97
98
  {
98
 
    Server* tmp= servers[number_of_host];
 
99
    Server* tmp= servers[host_to_shutdown];
99
100
 
100
 
    if (tmp and tmp->has_pid() and tmp->kill() == false)
 
101
    if (tmp and tmp->kill() == false)
101
102
    { }
102
103
    else
103
104
    {
108
109
  return false;
109
110
}
110
111
 
111
 
void server_startup_st::shutdown_and_remove()
 
112
void server_startup_st::clear()
112
113
{
113
114
  for (std::vector<Server *>::iterator iter= servers.begin(); iter != servers.end(); iter++)
114
115
  {
166
167
 
167
168
server_startup_st::~server_startup_st()
168
169
{
169
 
  shutdown_and_remove();
 
170
  clear();
170
171
}
171
172
 
172
173
bool server_startup_st::validate()