projects
/
awesomized
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
602bbb2
)
Refactored call, removed abort() call (we should never cause the parent
author
<brian@gir-3.local>
<>
Tue, 9 Sep 2008 00:10:38 +0000
(17:10 -0700)
committer
<brian@gir-3.local>
<>
Tue, 9 Sep 2008 00:10:38 +0000
(17:10 -0700)
program to die).
libmemcached/memcached_storage.c
patch
|
blob
|
history
diff --git
a/libmemcached/memcached_storage.c
b/libmemcached/memcached_storage.c
index 7284e13636e485f00d0d79093545187e2b0a1349..93bc140ae2175341c56c446935f5fa4a2420cee3 100644
(file)
--- a/
libmemcached/memcached_storage.c
+++ b/
libmemcached/memcached_storage.c
@@
-330,6
+330,7
@@
static memcached_return memcached_send_binary(memcached_server_st* server,
uint64_t cas,
memcached_storage_action verb)
{
uint64_t cas,
memcached_storage_action verb)
{
+ char flush;
protocol_binary_request_set request= {.bytes= {0}};
size_t send_length= sizeof(request.bytes);
protocol_binary_request_set request= {.bytes= {0}};
size_t send_length= sizeof(request.bytes);
@@
-354,15
+355,14
@@
static memcached_return memcached_send_binary(memcached_server_st* server,
case CAS_OP:
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_REPLACE;
break;
case CAS_OP:
request.message.header.request.opcode= PROTOCOL_BINARY_CMD_REPLACE;
break;
- default:
- abort();
}
request.message.header.request.keylen= htons((uint16_t)key_length);
request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
if (verb == APPEND_OP || verb == PREPEND_OP)
send_length -= 8; /* append & prepend does not contain extras! */
}
request.message.header.request.keylen= htons((uint16_t)key_length);
request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
if (verb == APPEND_OP || verb == PREPEND_OP)
send_length -= 8; /* append & prepend does not contain extras! */
- else {
+ else
+ {
request.message.header.request.extlen= 8;
request.message.body.flags= htonl(flags);
request.message.body.expiration= htonl((uint32_t)expiration);
request.message.header.request.extlen= 8;
request.message.body.flags= htonl(flags);
request.message.body.expiration= htonl((uint32_t)expiration);
@@
-374,7
+374,7
@@
static memcached_return memcached_send_binary(memcached_server_st* server,
if (cas)
request.message.header.request.cas= htonll(cas);
if (cas)
request.message.header.request.cas= htonll(cas);
-
char
flush= ((server->root->flags & MEM_BUFFER_REQUESTS) && verb == SET_OP) ? 0 : 1;
+ flush= ((server->root->flags & MEM_BUFFER_REQUESTS) && verb == SET_OP) ? 0 : 1;
/* write the header */
if ((memcached_do(server, (const char*)request.bytes, send_length, 0) != MEMCACHED_SUCCESS) ||
(memcached_io_write(server, key, key_length, 0) == -1) ||
/* write the header */
if ((memcached_do(server, (const char*)request.bytes, send_length, 0) != MEMCACHED_SUCCESS) ||
(memcached_io_write(server, key, key_length, 0) == -1) ||