memcached_st *memcached_create(memcached_st *ptr)
{
- memcached_string_st *string_ptr;
+ memcached_result_st *result_ptr;
if (!ptr)
{
ptr= (memcached_st *)malloc(sizeof(memcached_st));
{
memset(ptr, 0, sizeof(memcached_st));
}
- string_ptr= memcached_string_create(ptr, &ptr->result_buffer, 0);
- WATCHPOINT_ASSERT(string_ptr);
- ptr->poll_timeout= -1;
- ptr->distribution= MEMCACHED_DISTRIBUTION_MODULO;
+ result_ptr= memcached_result_create(ptr, &ptr->result);
+ WATCHPOINT_ASSERT(result_ptr);
+ ptr->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT;
+ ptr->distribution= MEMCACHED_DISTRIBUTION_MODULA;
return ptr;
}
/* If we have anything open, lets close it now */
memcached_quit(ptr);
memcached_server_list_free(ptr->hosts);
- memcached_string_free(&ptr->result_buffer);
+ memcached_result_free(&ptr->result);
if (ptr->is_allocated == MEMCACHED_ALLOCATED)
free(ptr);
new_clone->recv_size= ptr->recv_size;
new_clone->poll_timeout= ptr->poll_timeout;
new_clone->distribution= ptr->distribution;
+ new_clone->hash= ptr->hash;
return new_clone;
}