X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fstats.c;h=957c5b615a28b2f6a1c56dc3ecf53ff4d18dbadd;hb=ad62715a7d4dc200a9b77ae61fc62a4a896a865f;hp=4f3bdb0d0af548b15fa2465d16feb1c209dba674;hpb=1d8231fc194a56976c5bb14a75ff548ef5440191;p=m6w6%2Flibmemcached diff --git a/libmemcached/stats.c b/libmemcached/stats.c index 4f3bdb0d..957c5b61 100644 --- a/libmemcached/stats.c +++ b/libmemcached/stats.c @@ -369,7 +369,7 @@ memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_retur return NULL; } - stats= ptr->call_calloc(ptr, ptr->number_of_hosts, sizeof(memcached_stat_st)); + stats= ptr->call_calloc(ptr, memcached_server_count(ptr), sizeof(memcached_stat_st)); stats->root= ptr; @@ -380,7 +380,7 @@ memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_retur } rc= MEMCACHED_SUCCESS; - for (x= 0; x < ptr->number_of_hosts; x++) + for (x= 0; x < memcached_server_count(ptr); x++) { memcached_return_t temp_return;