projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Removed bind() call (and I have no idea how that got in there...)
[m6w6/libmemcached]
/
lib
/
memcached_response.c
diff --git
a/lib/memcached_response.c
b/lib/memcached_response.c
index 91ae3fe60870e48092bd2c1bff8f28c56c81717e..24ee832f148a593ab9791f049abb1308d2170aad 100644
(file)
--- a/
lib/memcached_response.c
+++ b/
lib/memcached_response.c
@@
-5,7
+5,7
@@
from an issued command.
*/
from an issued command.
*/
-#include
<memcached.h>
+#include
"common.h"
memcached_return memcached_response(memcached_st *ptr,
char *buffer, size_t buffer_length,
memcached_return memcached_response(memcached_st *ptr,
char *buffer, size_t buffer_length,
@@
-21,7
+21,9
@@
memcached_return memcached_response(memcached_st *ptr,
while (1)
{
unsigned int read_length;
while (1)
{
unsigned int read_length;
- read_length= read(ptr->hosts[server_key].fd, buffer_ptr, 1);
+
+ read_length= memcached_io_read(ptr, server_key,
+ buffer_ptr, 1);
if (read_length != 1)
return MEMCACHED_UNKNOWN_READ_FAILURE;
if (read_length != 1)
return MEMCACHED_UNKNOWN_READ_FAILURE;
@@
-48,7
+50,7
@@
memcached_return memcached_response(memcached_st *ptr,
return MEMCACHED_UNKNOWN_READ_FAILURE;
}
case 'D': /* DELETED */
return MEMCACHED_UNKNOWN_READ_FAILURE;
}
case 'D': /* DELETED */
- return MEMCACHED_
SUCCESS
;
+ return MEMCACHED_
DELETED
;
case 'N': /* NOT_FOUND */
{
if (buffer[4] == 'F')
case 'N': /* NOT_FOUND */
{
if (buffer[4] == 'F')
@@
-61,7
+63,7
@@
memcached_return memcached_response(memcached_st *ptr,
case 'E': /* PROTOCOL ERROR or END */
{
if (buffer[1] == 'N')
case 'E': /* PROTOCOL ERROR or END */
{
if (buffer[1] == 'N')
- return MEMCACHED_
NOTFOU
ND;
+ return MEMCACHED_
E
ND;
else if (buffer[1] == 'R')
return MEMCACHED_PROTOCOL_ERROR;
else
else if (buffer[1] == 'R')
return MEMCACHED_PROTOCOL_ERROR;
else
@@
-72,7
+74,6
@@
memcached_return memcached_response(memcached_st *ptr,
default:
return MEMCACHED_UNKNOWN_READ_FAILURE;
default:
return MEMCACHED_UNKNOWN_READ_FAILURE;
- return MEMCACHED_READ_FAILURE;
}
return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;