projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix connect with timeouts
[awesomized/libmemcached]
/
libmemcached
/
memcached_fetch.c
diff --git
a/libmemcached/memcached_fetch.c
b/libmemcached/memcached_fetch.c
index 2cefe65f21828dd7e39fffbddb473174be647de9..f728bebc45fe690504aaa233ae064f51cd780e5c 100644
(file)
--- a/
libmemcached/memcached_fetch.c
+++ b/
libmemcached/memcached_fetch.c
@@
-31,7
+31,7
@@
memcached_return value_fetch(memcached_server_st *ptr,
key= result->key;
result->key_length= 0;
key= result->key;
result->key_length= 0;
- for (prefix_length= ptr->root->prefix_key_length;
isgraph(*string_ptr)
; string_ptr++)
+ for (prefix_length= ptr->root->prefix_key_length;
!(iscntrl(*string_ptr) || isspace(*string_ptr))
; string_ptr++)
{
if (prefix_length == 0)
{
{
if (prefix_length == 0)
{
@@
-53,7
+53,7
@@
memcached_return value_fetch(memcached_server_st *ptr,
if (end_ptr == string_ptr)
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
if (end_ptr == string_ptr)
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
- result->flags=
(uint32_t)strto
l(next_ptr, &string_ptr, 10);
+ result->flags=
strtou
l(next_ptr, &string_ptr, 10);
if (end_ptr == string_ptr)
goto read_error;
if (end_ptr == string_ptr)
goto read_error;
@@
-64,7
+64,7
@@
memcached_return value_fetch(memcached_server_st *ptr,
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
goto read_error;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
- value_length= (size_t)strtoll(next_ptr, &string_ptr, 10);
+ value_length= (size_t)strto
u
ll(next_ptr, &string_ptr, 10);
if (end_ptr == string_ptr)
goto read_error;
if (end_ptr == string_ptr)
goto read_error;
@@
-79,7
+79,7
@@
memcached_return value_fetch(memcached_server_st *ptr,
{
string_ptr++;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
{
string_ptr++;
for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++);
- result->cas=
(size_t)strto
ll(next_ptr, &string_ptr, 10);
+ result->cas=
strtou
ll(next_ptr, &string_ptr, 10);
}
if (end_ptr < string_ptr)
}
if (end_ptr < string_ptr)
@@
-127,9
+127,9
@@
read_error:
}
char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
}
char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
- size_t *value_length,
- uint32_t *flags,
- memcached_return *error)
+
size_t *value_length,
+
uint32_t *flags,
+
memcached_return *error)
{
memcached_result_st *result_buffer= &ptr->result;
{
memcached_result_st *result_buffer= &ptr->result;
@@
-187,8
+187,6
@@
memcached_result_st *memcached_fetch_result(memcached_st *ptr,
if (result == NULL)
result= memcached_result_create(ptr, NULL);
if (result == NULL)
result= memcached_result_create(ptr, NULL);
- WATCHPOINT_ASSERT(result->value.is_allocated != MEMCACHED_USED);
-
#ifdef UNUSED
if (ptr->flags & MEM_NO_BLOCK)
memcached_io_preread(ptr);
#ifdef UNUSED
if (ptr->flags & MEM_NO_BLOCK)
memcached_io_preread(ptr);
@@
-219,7
+217,7
@@
memcached_result_st *memcached_fetch_result(memcached_st *ptr,
}
/* We have completed reading data */
}
/* We have completed reading data */
- if (result->is_allocated
== MEMCACHED_ALLOCATED
)
+ if (result->is_allocated)
memcached_result_free(result);
else
memcached_string_reset(&result->value);
memcached_result_free(result);
else
memcached_string_reset(&result->value);