projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge in more updates for docs (we are just going to check them all in so that users...
[awesomized/libmemcached]
/
libmemcached
/
protocol
/
binary_handler.c
diff --git
a/libmemcached/protocol/binary_handler.c
b/libmemcached/protocol/binary_handler.c
index 2bafdeb1a445df0378bb4e366a955f1fca2bee3c..a9e4ce95890915f0cc067c7004d8ac9944afb7a5 100644
(file)
--- a/
libmemcached/protocol/binary_handler.c
+++ b/
libmemcached/protocol/binary_handler.c
@@
-3,7
+3,6
@@
#include <stdlib.h>
#include <sys/types.h>
#include <stdlib.h>
#include <sys/types.h>
-#include <sys/socket.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
@@
-40,7
+39,7
@@
raw_response_handler(const void *cookie,
if (!client->root->drain(client))
{
if (!client->root->drain(client))
{
- return PROTOCOL_BINARY_RESPONSE_EI
O
;
+ return PROTOCOL_BINARY_RESPONSE_EI
NTERNAL
;
}
size_t len= sizeof(*response) + htonl(response->response.bodylen);
}
size_t len= sizeof(*response) + htonl(response->response.bodylen);
@@
-59,14
+58,14
@@
raw_response_handler(const void *cookie,
num_bytes);
if (nw == -1)
{
num_bytes);
if (nw == -1)
{
- if (
errno
== EWOULDBLOCK)
+ if (
get_socket_errno()
== EWOULDBLOCK)
{
break;
}
{
break;
}
- else if (
errno
!= EINTR)
+ else if (
get_socket_errno()
!= EINTR)
{
client->error= errno;
{
client->error= errno;
- return PROTOCOL_BINARY_RESPONSE_EI
O
;
+ return PROTOCOL_BINARY_RESPONSE_EI
NTERNAL
;
}
}
else
}
}
else
@@
-701,7
+700,7
@@
quit_command_handler(const void *cookie,
}
/* I need a better way to signal to close the connection */
}
/* I need a better way to signal to close the connection */
- return PROTOCOL_BINARY_RESPONSE_EI
O
;
+ return PROTOCOL_BINARY_RESPONSE_EI
NTERNAL
;
}
/**
}
/**
@@
-971,8
+970,8
@@
static protocol_binary_response_status execute_command(memcached_protocol_client
}
if (rval != PROTOCOL_BINARY_RESPONSE_SUCCESS &&
}
if (rval != PROTOCOL_BINARY_RESPONSE_SUCCESS &&
- rval != PROTOCOL_BINARY_RESPONSE_EI
O
&&
- rval != PROTOCOL_BINARY_RESPONSE_
PAUSE
)
+ rval != PROTOCOL_BINARY_RESPONSE_EI
NTERNAL
&&
+ rval != PROTOCOL_BINARY_RESPONSE_
NOT_SUPPORTED
)
{
protocol_binary_response_no_extras response= {
.message= {
{
protocol_binary_response_no_extras response= {
.message= {
@@
-1019,12
+1018,12
@@
memcached_protocol_event_t memcached_binary_protocol_process_data(memcached_prot
client->current_command= header;
protocol_binary_response_status rv= execute_command(client, header);
client->current_command= header;
protocol_binary_response_status rv= execute_command(client, header);
- if (rv == PROTOCOL_BINARY_RESPONSE_EI
O
)
+ if (rv == PROTOCOL_BINARY_RESPONSE_EI
NTERNAL
)
{
*length= len;
*endptr= (void*)header;
return MEMCACHED_PROTOCOL_ERROR_EVENT;
{
*length= len;
*endptr= (void*)header;
return MEMCACHED_PROTOCOL_ERROR_EVENT;
- } else if (rv == PROTOCOL_BINARY_RESPONSE_
PAUSE
)
+ } else if (rv == PROTOCOL_BINARY_RESPONSE_
NOT_SUPPORTED
)
return MEMCACHED_PROTOCOL_PAUSE_EVENT;
ssize_t total= (ssize_t)(sizeof(*header) + ntohl(header->request.bodylen));
return MEMCACHED_PROTOCOL_PAUSE_EVENT;
ssize_t total= (ssize_t)(sizeof(*header) + ntohl(header->request.bodylen));