projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Partial work on making UDP protocol actually work (flush_all working!)
[m6w6/libmemcached]
/
lib
/
memcached_storage.c
diff --git
a/lib/memcached_storage.c
b/lib/memcached_storage.c
index 5f69413564dcdcc9dc1f9d20becedc8b40f013dc..d8b124325aafb4c08270f0cadae4f423aa85e8bc 100644
(file)
--- a/
lib/memcached_storage.c
+++ b/
lib/memcached_storage.c
@@
-20,7
+20,7
@@
typedef enum {
} memcached_storage_action;
/* Inline this */
} memcached_storage_action;
/* Inline this */
-char *storage_op_string(memcached_storage_action verb)
+
static
char *storage_op_string(memcached_storage_action verb)
{
switch (verb)
{
{
switch (verb)
{
@@
-86,31
+86,31
@@
static inline memcached_return memcached_send(memcached_st *ptr,
goto error;
}
goto error;
}
- rc= memcached_do(
ptr, server_key
, buffer, write_length, 0);
+ rc= memcached_do(
&ptr->hosts[server_key]
, buffer, write_length, 0);
if (rc != MEMCACHED_SUCCESS)
goto error;
if (rc != MEMCACHED_SUCCESS)
goto error;
- if ((sent_length= memcached_io_write(
ptr, server_key
, value, value_length, 0)) == -1)
+ if ((sent_length= memcached_io_write(
&ptr->hosts[server_key]
, value, value_length, 0)) == -1)
{
rc= MEMCACHED_WRITE_FAILURE;
goto error;
}
{
rc= MEMCACHED_WRITE_FAILURE;
goto error;
}
- if ((ptr->flags & MEM_
NO_BLOCK
) && verb == SET_OP)
+ if ((ptr->flags & MEM_
BUFFER_REQUESTS
) && verb == SET_OP)
to_write= 0;
else
to_write= 1;
to_write= 0;
else
to_write= 1;
- if ((sent_length= memcached_io_write(
ptr, server_key
, "\r\n", 2, to_write)) == -1)
+ if ((sent_length= memcached_io_write(
&ptr->hosts[server_key]
, "\r\n", 2, to_write)) == -1)
{
rc= MEMCACHED_WRITE_FAILURE;
goto error;
}
if (to_write == 0)
{
rc= MEMCACHED_WRITE_FAILURE;
goto error;
}
if (to_write == 0)
- r
c= MEMCACHED_SUCCESS
;
- else
-
rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, server_key
);
+ r
eturn MEMCACHED_BUFFERED
;
+
+
rc= memcached_response(&ptr->hosts[server_key], buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL
);
if (rc == MEMCACHED_STORED)
return MEMCACHED_SUCCESS;
if (rc == MEMCACHED_STORED)
return MEMCACHED_SUCCESS;
@@
-118,7
+118,7
@@
static inline memcached_return memcached_send(memcached_st *ptr,
return rc;
error:
return rc;
error:
- memcached_io_reset(
ptr, server_key
);
+ memcached_io_reset(
&ptr->hosts[server_key]
);
return rc;
}
return rc;
}