{
if (not self)
{
- self= (memcached_server_st *)libmemcached_malloc(memc, sizeof(memcached_server_st));
+ self= libmemcached_xmalloc(memc, struct memcached_server_st);
if (not self)
{
memcached_io_init_udp_header(self, 0);
}
+ if (memc)
+ {
+ set_hostinfo(self);
+ }
+
return self;
}
hostname,
source->port, source->weight,
source->type);
- if (destination)
- {
- if (source->error_messages)
- {
- destination->error_messages= memcached_error_copy(*source);
- }
- }
-
return destination;
}