* compatibility.
*/
if (ptr->root->flags.binary_protocol == false)
+ {
while (memcached_server_response_count(ptr) > 1)
{
memcached_return_t rc= memcached_read_one_response(ptr, buffer, buffer_length, result);
rc != MEMCACHED_DATA_EXISTS)
return rc;
}
+ }
return memcached_read_one_response(ptr, buffer, buffer_length, result);
}
memcached_server_fn callbacks[1];
memcached_version(memc);
- struct local_context check= { .major_version= major_version, .minor_version= minor_version, .micro_version= micro_version, .truth= true };
+ struct local_context check= { .major_version= major_version, .minor_version= minor_version, .micro_version= micro_version, .truth= true };
+ memcached_version(memc);
callbacks[0]= check_server_version;
memcached_server_cursor(memc, callbacks, (void *)&check, 1);
if (ptr->flags.use_udp)
return MEMCACHED_NOT_SUPPORTED;
+ bool was_blocking= ptr->flags.no_block;
+ memcached_return_t rc;
+
+ ptr->flags.no_block= false;
+
if (ptr->flags.binary_protocol)
- return memcached_version_binary(ptr);
+ rc= memcached_version_binary(ptr);
else
- return memcached_version_textual(ptr);
+ rc= memcached_version_textual(ptr);
+
+ ptr->flags.no_block= was_blocking;
+
+ return rc;
}
static inline memcached_return_t memcached_version_textual(memcached_st *ptr)