#include "common.h"
-memcached_server_st *memcached_servers_parse(const char *server_strings)
+memcached_server_list_st memcached_servers_parse(const char *server_strings)
{
char *string;
- uint32_t port;
- uint32_t weight;
const char *begin_ptr;
const char *end_ptr;
memcached_server_st *servers= NULL;
{
char buffer[HUGE_STRING_LEN];
char *ptr, *ptr2;
- port= 0;
- weight= 0;
+ uint32_t weight= 0;
if (string)
{
ptr= index(buffer, ':');
+ in_port_t port= 0;
if (ptr)
{
ptr[0]= 0;
ptr++;
- port= (uint32_t) strtoul(ptr, (char **)NULL, 10);
+ port= (in_port_t) strtoul(ptr, (char **)NULL, 10);
ptr2= index(ptr, ' ');
if (! ptr2)
ptr2= index(ptr, ':');
+
if (ptr2)
{
ptr2++;