}
}
else
- fprintf(stderr, "Failed to create socket: %s\n",
- strerror(get_socket_errno()));
+ {
+ fprintf(stderr, "Failed to create socket: %s\n", strerror(get_socket_errno()));
+ }
freeaddrinfo(ai);
}
struct test_type_st tests= { true, true };
int total= 0;
int failed= 0;
- const char *hostname= "localhost";
- const char *port= "11211";
+ const char *hostname= NULL;
+ const char *port= MEMCACHED_DEFAULT_PORT_STRING;
int cmd;
bool prompt= false;
const char *testname= NULL;
}
}
+ if (hostname)
+ {
+ fprintf(stderr, "No hostname was provided.\n");
+ return EXIT_FAILURE;
+ }
+
initialize_sockets();
sock= connect_server(hostname, port);
if (sock == INVALID_SOCKET)
/* Public defines */
#define MEMCACHED_DEFAULT_PORT 11211
+#define MEMCACHED_DEFAULT_PORT_STRING "11211"
#define MEMCACHED_POINTS_PER_SERVER 100
#define MEMCACHED_POINTS_PER_SERVER_KETAMA 160
#define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This would then set max hosts to 100 */