* New parser calls for generating memcached_st objects.
* New error system.
+ * A behavior change has been now made that if you specify a weight for any
+ server, we enable the weight flag and do weight balancing.
+
0.48 Tue Mar 15 23:05:18 PDT 2011
* Fix memory leak in server parse.
* Move test framework out to be its own library (easier to work with Gearman).
self->next_retry= 0;
}
+ if (self->weight > 1 && root)
+ {
+ ((memcached_st *)root)->ketama.weighted= true;
+ }
+
self->root= root;
self->limit_maxbytes= 0;
if (hostname == NULL)
+ {
self->hostname[0]= 0;
+ }
else
+ {
strncpy(self->hostname, hostname, NI_MAXHOST - 1);
+ }
}
static memcached_server_st *_server_create(memcached_server_st *self, const memcached_st *memc)
if (self == NULL)
return;
- const memcached_st *root= self->root;
-
for (uint32_t x= 0; x < memcached_server_list_count(self); x++)
{
if (self[x].address_info)
}
}
+ const memcached_st *root= self->root;
if (root)
{
libmemcached_free(root, self);