X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=example%2Finterface_v1.c;h=88cb59f636febeeba7ff04874bea9d477ac75ff4;hb=098b147ae544499cda8b3c7333173bb5f6e01b82;hp=bab1cd974f9e303826b610ec0b8d3212307490ab;hpb=771170f522f2186b7fb0cde6052dbe37c1a9f1b7;p=awesomized%2Flibmemcached diff --git a/example/interface_v1.c b/example/interface_v1.c index bab1cd97..88cb59f6 100644 --- 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. */ +#include "config.h" #include #include -#include -#include -#include #include #include #include @@ -20,8 +18,8 @@ #include #include -#include -#include +#include +#include #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, - uint64_t *result_cas) { + uint64_t *result_cas) +{ (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)); } -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_V1, .interface.v1= { .add= add_handler, .append= append_handler,