}
ptr->hosts[0].count= ptr->number_of_hosts;
- if (ptr->number_of_hosts > 1 && ptr->flags & MEMCACHED_BEHAVIOR_SORT_HOSTS)
+ if (ptr->number_of_hosts > 1 && ptr->flags & MEM_USE_SORT_HOSTS)
qsort(ptr->hosts, ptr->number_of_hosts, sizeof(memcached_server_st), compare_servers);
rebalance_wheel(ptr);
host_reset(ptr, &ptr->hosts[ptr->number_of_hosts], hostname, port, type);
ptr->number_of_hosts++;
- if (ptr->number_of_hosts > 1 && ptr->flags & MEMCACHED_BEHAVIOR_SORT_HOSTS)
+ if (ptr->number_of_hosts > 1 && ptr->flags & MEM_USE_SORT_HOSTS)
qsort(ptr->hosts, ptr->number_of_hosts, sizeof(memcached_server_st), compare_servers);
ptr->hosts[0].count= ptr->number_of_hosts;
/* Do Nothing */
uint32_t bigger= *((uint32_t *)(context));
assert(bigger <= server->port);
- *((uint32_t *)(context))= bigger;
+ *((uint32_t *)(context))= server->port;
return MEMCACHED_SUCCESS;
}
local_memc= memcached_create(NULL);
assert(local_memc);
- memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1);
for (x= 0; x < TEST_PORT_COUNT; x++)
{