X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fserver.cc;h=7f3a2d1eda5947444f60a7e23392e893c7642b26;hb=585b2385384b32af964b5f2f999e70173b33a460;hp=33b20ad89c3b940bde58b2905ab715029a3f54fa;hpb=17690735658d7b44f91579df91e31da9ae185158;p=awesomized%2Flibmemcached diff --git a/libtest/server.cc b/libtest/server.cc index 33b20ad8..7f3a2d1e 100644 --- a/libtest/server.cc +++ b/libtest/server.cc @@ -130,8 +130,7 @@ Server::~Server() bool Server::check() { _app.slurp(); - _app.check(); - return true; + return _app.check(); } bool Server::validate() @@ -173,6 +172,22 @@ bool Server::wait_for_pidfile() const return wait.successful(); } +bool Server::init(const char *argv[]) +{ + if (argv) + { + for (const char **ptr= argv; *ptr ; ++ptr) + { + if (ptr) + { + add_option(*ptr); + } + } + } + + return build(); +} + bool Server::has_pid() const { return (_app.pid() > 1); @@ -181,14 +196,6 @@ bool Server::has_pid() const bool Server::start() { - // If we find that we already have a pid then kill it. - if (has_pid() == true) - { -#if 0 - fatal_message("has_pid() failed, programer error"); -#endif - } - if (getenv("YATL_GDB_SERVER")) { _app.use_gdb(true);