if (ptr->hosts[server_key].fd == -1)
{
/* Old connection junk still is in the structure */
- assert(ptr->hosts[server_key].stack_responses == 0);
+ WATCHPOINT_ASSERT(ptr->hosts[server_key].stack_responses == 0);
if ((h= gethostbyname(ptr->hosts[server_key].hostname)) == NULL)
{
}
ptr->connected++;
}
- assert(ptr->hosts[server_key].stack_responses == 0);
+ WATCHPOINT_ASSERT(ptr->hosts[server_key].stack_responses == 0);
}
return MEMCACHED_SUCCESS;
memcached_return memcached_connect(memcached_st *ptr, unsigned int server_key)
{
- memcached_return rc;
+ memcached_return rc= MEMCACHED_NO_SERVERS;
LIBMEMCACHED_MEMCACHED_CONNECT_START();
if (ptr->connected == ptr->number_of_hosts)
unsigned int x;
for (x= 0; x < ptr->number_of_hosts; x++)
- rc= memcached_real_connect(ptr, x);
+ {
+ memcached_return possible_rc;
+
+ possible_rc= memcached_real_connect(ptr, x);
+ rc= MEMCACHED_SUCCESS;
+
+ if (possible_rc != MEMCACHED_SUCCESS)
+ rc= MEMCACHED_SOME_ERRORS;
+ }
}
LIBMEMCACHED_MEMCACHED_CONNECT_END();