From dd654699e3e087744272784a5695e24db9e4b0bc Mon Sep 17 00:00:00 2001 From: Date: Thu, 27 Sep 2007 15:28:41 -0700 Subject: [PATCH] Adding support for spaces in configure options. Fixed issue with wrong pointer leading to connecting to wrong server! --- src/utilities.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utilities.c b/src/utilities.c index eeec1688..4f5b4526 100644 --- a/src/utilities.c +++ b/src/utilities.c @@ -1,3 +1,4 @@ +#include #include void parse_opt_servers(memcached_st *memc, @@ -29,9 +30,8 @@ void parse_opt_servers(memcached_st *memc, } else { - size_t length= strlen(server_strings); + size_t length= strlen(begin_ptr); memcpy(buffer, begin_ptr, length); - string= server_strings+length; begin_ptr= end_ptr; } @@ -47,5 +47,8 @@ void parse_opt_servers(memcached_st *memc, } memcached_server_add(memc, buffer, port); + + if (isspace(*begin_ptr)) + begin_ptr++; } } -- 2.30.2