version_textual no longer attempts to parse invalid response
authorEric Lambert <eric.lambert@sun.com>
Tue, 24 Feb 2009 12:22:13 +0000 (04:22 -0800)
committerEric Lambert <eric.lambert@sun.com>
Tue, 24 Feb 2009 12:22:13 +0000 (04:22 -0800)
libmemcached/memcached_version.c

index 0a77529c7d1ed5ab1926c903a774fe0082728791..40310f6fa570d4fd826218d53af128e4e88328c0 100644 (file)
@@ -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, ' ');