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:
0918f45
)
Correction for UDP code in ascii mode.
author
Brian Aker
<brian@tangent.org>
Mon, 28 Nov 2011 05:05:08 +0000
(21:05 -0800)
committer
Brian Aker
<brian@tangent.org>
Mon, 28 Nov 2011 05:05:08 +0000
(21:05 -0800)
libmemcached/storage.cc
patch
|
blob
|
history
tests/libmemcached_world.h
patch
|
blob
|
history
tests/mem_functions.cc
patch
|
blob
|
history
tests/mem_udp.cc
patch
|
blob
|
history
tests/plus.cpp
patch
|
blob
|
history
diff --git
a/libmemcached/storage.cc
b/libmemcached/storage.cc
index f3616251dedf647f14727dd34850ad5160af61eb..89bc8e879232523f964182a0a8a816daa7fbe279 100644
(file)
--- a/
libmemcached/storage.cc
+++ b/
libmemcached/storage.cc
@@
-276,7
+276,7
@@
static memcached_return_t memcached_send_ascii(memcached_st *ptr,
WATCHPOINT_ASSERT(write_length < MEMCACHED_DEFAULT_COMMAND_SIZE);
}
WATCHPOINT_ASSERT(write_length < MEMCACHED_DEFAULT_COMMAND_SIZE);
}
- if (ptr->flags.use_udp
and ptr->flags.buffer_requests
)
+ if (ptr->flags.use_udp)
{
size_t cmd_size= write_length + value_length +2;
if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
{
size_t cmd_size= write_length + value_length +2;
if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
diff --git
a/tests/libmemcached_world.h
b/tests/libmemcached_world.h
index 09000c36f56ddd19af86f28c17fe4eb51ccbe466..ad55d17c600ed89e04187f753fc760d05dc13fdf 100644
(file)
--- a/
tests/libmemcached_world.h
+++ b/
tests/libmemcached_world.h
@@
-48,7
+48,6
@@
static void *world_create(server_startup_st& servers, test_return_t& error)
return NULL;
}
return NULL;
}
-
in_port_t max_port= TEST_PORT_BASE;
for (uint32_t x= 0; x < servers.count(); x++)
{
in_port_t max_port= TEST_PORT_BASE;
for (uint32_t x= 0; x < servers.count(); x++)
{
diff --git
a/tests/mem_functions.cc
b/tests/mem_functions.cc
index ce352609143f2b448175b4284f0a01fa52062980..c2fbdc322e88f1279f91d30645c2dd53f0b38783 100644
(file)
--- a/
tests/mem_functions.cc
+++ b/
tests/mem_functions.cc
@@
-3122,17
+3122,16
@@
static test_return_t generate_data(memcached_st *memc)
static test_return_t generate_data_with_stats(memcached_st *memc)
{
static test_return_t generate_data_with_stats(memcached_st *memc)
{
- uint32_t host_index= 0;
unsigned int check_execute= execute_set(memc, global_pairs, global_count);
unsigned int check_execute= execute_set(memc, global_pairs, global_count);
- test_
true(check_execute ==
global_count);
+ test_
compare(check_execute,
global_count);
// @todo hosts used size stats
memcached_return_t rc;
memcached_stat_st *stat_p= memcached_stat(memc, NULL, &rc);
test_true(stat_p);
// @todo hosts used size stats
memcached_return_t rc;
memcached_stat_st *stat_p= memcached_stat(memc, NULL, &rc);
test_true(stat_p);
- for (host_index= 0; host_index < SERVERS_TO_CREATE; host_index++)
+ for (
uint32_t
host_index= 0; host_index < SERVERS_TO_CREATE; host_index++)
{
/* This test was changes so that "make test" would work properlly */
if (DEBUG)
{
/* This test was changes so that "make test" would work properlly */
if (DEBUG)
diff --git
a/tests/mem_udp.cc
b/tests/mem_udp.cc
index fc469baec60150e0eea226025c75667dec1b4aca..16fc1c73cbc3f3f2356ade8468131ff7bb4a9df7 100644
(file)
--- a/
tests/mem_udp.cc
+++ b/
tests/mem_udp.cc
@@
-180,6
+180,7
@@
static test_return_t udp_set_test(memcached_st *memc)
Expected expected_ids;
get_udp_request_ids(memc, expected_ids);
unsigned int server_key= memcached_generate_hash(memc, test_literal_param("foo"));
Expected expected_ids;
get_udp_request_ids(memc, expected_ids);
unsigned int server_key= memcached_generate_hash(memc, test_literal_param("foo"));
+ test_true(server_key < memcached_server_count(memc));
memcached_server_instance_st instance= memcached_server_instance_by_position(memc, server_key);
size_t init_offset= instance->write_buffer_offset;
memcached_server_instance_st instance= memcached_server_instance_by_position(memc, server_key);
size_t init_offset= instance->write_buffer_offset;
@@
-453,7
+454,7
@@
collection_st collection[] ={
};
#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10
};
#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10
-#include "libmemcached_world.h"
+#include "
tests/
libmemcached_world.h"
void get_world(Framework *world)
{
void get_world(Framework *world)
{
diff --git
a/tests/plus.cpp
b/tests/plus.cpp
index 7de8164f7db8868df15b8a6a04361db52a2dc84f..5078f1f5583cea9c07ab32f5524eec8c3b5ed13c 100644
(file)
--- a/
tests/plus.cpp
+++ b/
tests/plus.cpp
@@
-282,7
+282,7
@@
collection_st collection[] ={
#define SERVERS_TO_CREATE 5
#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10
#define SERVERS_TO_CREATE 5
#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10
-#include "libmemcached_world.h"
+#include "
tests/
libmemcached_world.h"
void get_world(Framework *world)
{
void get_world(Framework *world)
{