0.19
* Read through cached support.
* Fixed for cas by key operation.
+ * Fix for memcached_server_st list structures to have correct count.
0.18 Sun Mar 16 21:57:55 PDT 2008
host_reset(ptr, &ptr->hosts[ptr->number_of_hosts], hostname, port, type);
ptr->number_of_hosts++;
- ptr->hosts[0].count++;
if (ptr->number_of_hosts > 1)
qsort(ptr->hosts, ptr->number_of_hosts, sizeof(memcached_server_st), compare_servers);
+ ptr->hosts[0].count= ptr->number_of_hosts;
+
rebalance_wheel(ptr);
LIBMEMCACHED_MEMCACHED_SERVER_ADD_END();
host_reset(NULL, &new_host_list[count-1], hostname, port, MEMCACHED_CONNECTION_TCP);
- /* Backwards compatibility hack */
- new_host_list[0].count++;
-
- count= new_host_list[0].count;
-
+ /* We alway sort lists by default */
if (new_host_list[0].count > 1)
qsort(new_host_list, count, sizeof(memcached_server_st), compare_servers);
+ /* Backwards compatibility hack */
new_host_list[0].count= count;
{
test_ports[x]= random() % 64000;
rc= memcached_server_add(local_memc, "localhost", test_ports[x]);
+ assert(local_memc->number_of_hosts == x+1);
+ assert(local_memc->hosts[0].count == x+1);
assert(rc == MEMCACHED_SUCCESS);
}