Update free port logic.
[m6w6/libmemcached] / libtest / server_container.cc
index 2c31796f3e141c64530df63aabf99b253725e862..528fcd1fab180e288f45f9e356051e428f85f1c0 100644 (file)
@@ -146,23 +146,6 @@ 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];
-    snprintf(variable_buffer, sizeof(variable_buffer), "LIBTEST_PORT_%lu", (unsigned long)construct.count());
-
-    char *var;
-    if ((var= getenv(variable_buffer)))
-    {
-      in_port_t tmp= in_port_t(atoi(var));
-
-      if (tmp > 0)
-        try_port= tmp;
-    }
-  }
-
   libtest::Server *server= NULL;
   if (0)
   { }
@@ -249,12 +232,6 @@ bool server_startup(server_startup_st& construct, const std::string& server_type
 
   construct.push_server(server);
 
-  if (default_port() == 0)
-  {
-    assert(server->has_port());
-    set_default_port(server->port());
-  }
-
   Outn();
 
   return true;