X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fserver_container.cc;h=cd23169f5b61c022455c91f6c234b09344314d4a;hb=906d0558357bdd81dec000c71c165646af8c6e5f;hp=bba1240cabc5019022c6e5f3250a55604776669d;hpb=969fea8e7bed82c109685ec3976cf7b0ec514ae9;p=m6w6%2Flibmemcached diff --git a/libtest/server_container.cc b/libtest/server_container.cc index bba1240c..cd23169f 100644 --- a/libtest/server_container.cc +++ b/libtest/server_container.cc @@ -147,6 +147,8 @@ bool server_startup(server_startup_st& construct, const std::string& server_type Outn(); (void)try_port; + set_max_port(try_port); + // Look to see if we are being provided ports to use { char variable_buffer[1024]; @@ -173,33 +175,20 @@ bool server_startup(server_startup_st& construct, const std::string& server_type { server= build_gearmand("localhost", try_port); } - else - { - Error << "Libgearman was not found"; - } - } - else - { - Error << "No gearmand binary is available"; } } else if (server_type.compare("blobslap_worker") == 0) { - if (GEARMAND_BINARY and GEARMAND_BLOBSLAP_WORKER) + if (GEARMAND_BINARY) { - if (HAVE_LIBGEARMAN) - { - server= build_blobslap_worker(try_port); - } - else + if (GEARMAND_BLOBSLAP_WORKER) { - Error << "Libgearman was not found"; + if (HAVE_LIBGEARMAN) + { + server= build_blobslap_worker(try_port); + } } } - else - { - Error << "No gearmand binary is available"; - } } else if (server_type.compare("memcached-sasl") == 0) { @@ -209,14 +198,6 @@ bool server_startup(server_startup_st& construct, const std::string& server_type { server= build_memcached_sasl("localhost", try_port, construct.username(), construct.password()); } - else - { - Error << "Libmemcached was not found"; - } - } - else - { - Error << "No memcached binary that was compiled with sasl is available"; } } else if (server_type.compare("memcached") == 0) @@ -227,19 +208,7 @@ bool server_startup(server_startup_st& construct, const std::string& server_type { server= build_memcached("localhost", try_port); } - else - { - Error << "Libmemcached was not found"; - } } - else - { - Error << "No memcached binary is available"; - } - } - else - { - Error << "Failed to start " << server_type << ", no support was found to be compiled in for it."; } if (server == NULL) @@ -251,7 +220,7 @@ bool server_startup(server_startup_st& construct, const std::string& server_type /* We will now cycle the server we have created. */ - if (not server->cycle()) + if (server->cycle() == false) { Error << "Could not start up server " << *server; delete server; @@ -268,7 +237,7 @@ bool server_startup(server_startup_st& construct, const std::string& server_type Out << "run " << server->args(options); getchar(); } - else if (not server->start()) + else if (server->start() == false) { Error << "Failed to start " << *server; delete server;