projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
release 1.1.0-beta2
[awesomized/libmemcached]
/
src
/
libmemcached
/
hosts.cc
diff --git
a/src/libmemcached/hosts.cc
b/src/libmemcached/hosts.cc
index 39247287666d55fed37f5b5f72242057fa5f462d..ad01decd70faa1c4e494714db853cfb8011aac0d 100644
(file)
--- a/
src/libmemcached/hosts.cc
+++ b/
src/libmemcached/hosts.cc
@@
-15,12
+15,10
@@
#include "libmemcached/common.h"
#include "libmemcached/assert.hpp"
#include "libmemcached/common.h"
#include "libmemcached/assert.hpp"
+#include "p9y/gettimeofday.hpp"
+#include "p9y/random.hpp"
#include <cmath>
#include <cmath>
-#if HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#include <time.h>
/* Protoypes (static) */
static memcached_return_t update_continuum(Memcached *ptr);
/* Protoypes (static) */
static memcached_return_t update_continuum(Memcached *ptr);
@@
-313,7
+311,7
@@
static memcached_return_t server_add(Memcached *memc, const memcached_string_t &
memcached_instance_st *instance =
memcached_instance_fetch(memc, memcached_server_count(memc) - 1);
memcached_instance_st *instance =
memcached_instance_fetch(memc, memcached_server_count(memc) - 1);
- if (
__
instance_create_with(memc, instance, hostname, port, weight, type) == NULL) {
+ if (instance_create_with(memc, instance, hostname, port, weight, type) == NULL) {
return memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT);
}
return memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT);
}
@@
-355,8
+353,7
@@
memcached_return_t memcached_server_push(memcached_st *shell, const memcached_se
WATCHPOINT_ASSERT(instance);
memcached_string_t hostname = {memcached_string_make_from_cstr(list[x].hostname)};
WATCHPOINT_ASSERT(instance);
memcached_string_t hostname = {memcached_string_make_from_cstr(list[x].hostname)};
- if (__instance_create_with(ptr, instance, hostname, list[x].port, list[x].weight,
- list[x].type)
+ if (instance_create_with(ptr, instance, hostname, list[x].port, list[x].weight, list[x].type)
== NULL)
{
ptr->state.is_parsing = false;
== NULL)
{
ptr->state.is_parsing = false;
@@
-406,8
+403,7
@@
memcached_return_t memcached_instance_push(memcached_st *ptr,
WATCHPOINT_ASSERT(instance);
memcached_string_t hostname = {memcached_string_make_from_cstr(list[x]._hostname)};
WATCHPOINT_ASSERT(instance);
memcached_string_t hostname = {memcached_string_make_from_cstr(list[x]._hostname)};
- if (__instance_create_with(ptr, instance, hostname, list[x].port(), list[x].weight,
- list[x].type)
+ if (instance_create_with(ptr, instance, hostname, list[x].port(), list[x].weight, list[x].type)
== NULL)
{
ptr->state.is_parsing = false;
== NULL)
{
ptr->state.is_parsing = false;