X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fhosts.cc;h=2a07a395c24fe05f24f1ea2d93d880d4387d3747;hb=eff4858179d7883b92ab8682392357d104d5a8ab;hp=dbfba007bd8d93c9c4d2e648e19e67da4ceab69b;hpb=674c7578fa870c3b57e81e765c355ce98434b310;p=m6w6%2Flibmemcached diff --git a/libmemcached/hosts.cc b/libmemcached/hosts.cc index dbfba007..2a07a395 100644 --- a/libmemcached/hosts.cc +++ b/libmemcached/hosts.cc @@ -62,10 +62,7 @@ static void sort_hosts(memcached_st *ptr) { if (memcached_server_count(ptr)) { - qsort(memcached_instance_list(ptr), memcached_server_count(ptr), sizeof(org::libmemcached::Instance), compare_servers); - org::libmemcached::Instance* instance= memcached_instance_fetch(ptr, 0); - instance->number_of_hosts= memcached_server_count(ptr); } } @@ -374,10 +371,6 @@ static memcached_return_t server_add(memcached_st *ptr, ptr->number_of_hosts++; - // @note we place the count in the bottom of the server list - instance= memcached_instance_fetch(ptr, 0); - memcached_instance_set_count(instance, memcached_server_count(ptr)); - return run_distribution(ptr); } @@ -424,12 +417,6 @@ memcached_return_t memcached_server_push(memcached_st *ptr, const memcached_serv ptr->number_of_hosts++; } - // Provides backwards compatibility with server list. - { - org::libmemcached::Instance* instance= memcached_instance_fetch(ptr, 0); - instance->number_of_hosts= memcached_server_count(ptr); - } - return run_distribution(ptr); } @@ -474,12 +461,6 @@ memcached_return_t memcached_instance_push(memcached_st *ptr, const struct org:: ptr->number_of_hosts++; } - // Provides backwards compatibility with server list. - { - org::libmemcached::Instance* instance= memcached_instance_fetch(ptr, 0); - instance->number_of_hosts= memcached_server_count(ptr); - } - return run_distribution(ptr); }