From: Date: Fri, 4 Apr 2008 07:54:04 +0000 (-0700) Subject: Fix for memcached_server_st after sort X-Git-Tag: 0.20~1^2~25 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b5f7308b859618041155d3804937bb43ac82f618;p=awesomized%2Flibmemcached Fix for memcached_server_st after sort --- diff --git a/libmemcached/memcached_hosts.c b/libmemcached/memcached_hosts.c index 87a8cbd3..863e7674 100644 --- a/libmemcached/memcached_hosts.c +++ b/libmemcached/memcached_hosts.c @@ -52,6 +52,7 @@ static int compare_servers(const void *p1, const void *p2) void sort_hosts(memcached_st *ptr) { qsort(ptr->hosts, ptr->number_of_hosts, sizeof(memcached_server_st), compare_servers); + ptr->hosts[0].count= ptr->number_of_hosts; } static void host_reset(memcached_st *ptr, memcached_server_st *host,