static memcached_return memcached_value_fetch(memcached_st *ptr, char *key, size_t *key_length,
memcached_string_st *value,
- uint16_t *flags,
+ uint32_t *flags,
uint64_t *cas,
unsigned int server_key)
{
{
*key_length= 0;
- for (; isalnum(*string_ptr); string_ptr++)
+ for (; isgraph(*string_ptr); string_ptr++)
{
*key= *string_ptr;
key++;
}
}
else /* Skip characters */
- for (; isalnum(*string_ptr); string_ptr++);
+ for (; isgraph(*string_ptr); string_ptr++);
if (end_ptr == string_ptr)
goto read_error;
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
if (flags)
- *flags= (uint16_t)strtol(next_ptr, &string_ptr, 10);
+ *flags= (uint32_t)strtol(next_ptr, &string_ptr, 10);
if (end_ptr == string_ptr)
goto read_error;
char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
size_t *value_length,
- uint16_t *flags,
+ uint32_t *flags,
memcached_return *error)
{
memcached_string_st *result_buffer;
result_buffer= &ptr->result_buffer;
+ if (ptr->flags & MEM_NO_BLOCK)
+ memcached_io_preread(ptr);
+
while (ptr->cursor_server < ptr->number_of_hosts)
{
if (!ptr->hosts[ptr->cursor_server].cursor_active)
WATCHPOINT_ASSERT(result->value.is_allocated != MEMCACHED_USED);
+ if (ptr->flags & MEM_NO_BLOCK)
+ memcached_io_preread(ptr);
+
while (ptr->cursor_server < ptr->number_of_hosts)
{
if (!ptr->hosts[ptr->cursor_server].cursor_active)