projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge for version.
[m6w6/libmemcached]
/
example
/
interface_v1.c
diff --git
a/example/interface_v1.c
b/example/interface_v1.c
index bab1cd974f9e303826b610ec0b8d3212307490ab..d2b20712664ec8321b5b78be51fe38ef28e7e9a5 100644
(file)
--- a/
example/interface_v1.c
+++ b/
example/interface_v1.c
@@
-8,11
+8,9
@@
* you will not receive the next command before a answer to the previous
* command is being sent.
*/
* you will not receive the next command before a answer to the previous
* command is being sent.
*/
+#include "config.h"
#include <assert.h>
#include <sys/types.h>
#include <assert.h>
#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/tcp.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
@@
-20,8
+18,8
@@
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#include <libmemcached
/protocol_
handler.h>
-#include <
libmemcached
/byteorder.h>
+#include <libmemcached
protocol-0.0/
handler.h>
+#include <
example
/byteorder.h>
#include "storage.h"
static protocol_binary_response_status add_handler(const void *cookie,
#include "storage.h"
static protocol_binary_response_status add_handler(const void *cookie,
@@
-64,7
+62,8
@@
static protocol_binary_response_status append_handler(const void *cookie,
const void* val,
uint32_t vallen,
uint64_t cas,
const void* val,
uint32_t vallen,
uint64_t cas,
- uint64_t *result_cas) {
+ uint64_t *result_cas)
+{
(void)cookie;
protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS;
(void)cookie;
protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS;
@@
-391,8
+390,8
@@
static protocol_binary_response_status version_handler(const void *cookie,
return response_handler(cookie, version, (uint32_t)strlen(version));
}
return response_handler(cookie, version, (uint32_t)strlen(version));
}
-
struct
memcached_binary_protocol_callback_st interface_v1_impl= {
- .interface_version= 1,
+memcached_binary_protocol_callback_st interface_v1_impl= {
+ .interface_version=
MEMCACHED_PROTOCOL_HANDLER_V
1,
.interface.v1= {
.add= add_handler,
.append= append_handler,
.interface.v1= {
.add= add_handler,
.append= append_handler,