memcached_server_st *memcached_servers_parse(const char *server_strings)
{
char *string;
- uint32_t port;
+ in_port_t port;
uint32_t weight;
const char *begin_ptr;
const char *end_ptr;
ptr++;
- port= (uint32_t) strtoul(ptr, (char **)NULL, 10);
+ port= (in_port_t) strtoul(ptr, (char **)NULL, 10);
ptr2= index(ptr, ' ');
if (! ptr2)
}
#define TEST_PORT_COUNT 7
-uint32_t test_ports[TEST_PORT_COUNT];
+in_port_t test_ports[TEST_PORT_COUNT];
static memcached_return_t server_display_function(memcached_st *ptr __attribute__((unused)), memcached_server_st *server, void *context)
{
for (x= 0; x < TEST_PORT_COUNT; x++)
{
- test_ports[x]= (uint32_t)random() % 64000;
+ test_ports[x]= (in_port_t)random() % 64000;
rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
test_truth(memcached_server_count(local_memc) == x + 1);
test_truth(memcached_servers_count(memcached_server_list(local_memc)) == x+1);
for (x= 0; x < TEST_PORT_COUNT; x++)
{
- test_ports[x]= (uint32_t)(random() % 64000);
+ test_ports[x]= (in_port_t)(random() % 64000);
rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
test_truth(memcached_server_count(local_memc) == x+1);
test_truth(memcached_servers_count(memcached_server_list(local_memc)) == x+1);