From: Eric Lambert Date: Tue, 24 Feb 2009 12:22:13 +0000 (-0800) Subject: version_textual no longer attempts to parse invalid response X-Git-Tag: 0.27~30 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=93b444da927e8e0ee3fd844ea617d96a04fbaa97;p=m6w6%2Flibmemcached version_textual no longer attempts to parse invalid response --- diff --git a/libmemcached/memcached_version.c b/libmemcached/memcached_version.c index 0a77529c..40310f6f 100644 --- a/libmemcached/memcached_version.c +++ b/libmemcached/memcached_version.c @@ -41,7 +41,10 @@ static inline memcached_return memcached_version_textual(memcached_st *ptr) rrc= memcached_response(&ptr->hosts[x], buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL); if (rrc != MEMCACHED_SUCCESS) + { rc= MEMCACHED_SOME_ERRORS; + continue; + } /* Find the space, and then move one past it to copy version */ response_ptr= index(buffer, ' ');