X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcachedutil%2Fpid.cc;h=346561183b40c89e222615dfd2b125081d22fc92;hb=701592b9754d2ace633882791c755826e3a8af68;hp=99f378d1656c76572472718467e9720cc46a444f;hpb=920b0f21e75bb5b145a7de7383f5ae8c4a2c358a;p=awesomized%2Flibmemcached diff --git a/libmemcachedutil/pid.cc b/libmemcachedutil/pid.cc index 99f378d1..34656118 100644 --- a/libmemcachedutil/pid.cc +++ b/libmemcachedutil/pid.cc @@ -74,10 +74,10 @@ pid_t libmemcached_util_getpid(const char *hostname, in_port_t port, memcached_r } else if (rc == MEMCACHED_SOME_ERRORS) // Generic answer, we will now find the specific reason (if one exists) { - memcached_server_instance_st instance= memcached_server_instance_by_position(memc_ptr, 0); + const memcached_instance_st * instance= memcached_server_instance_by_position(memc_ptr, 0); - assert_msg(instance and instance->error_messages, " "); - if (instance and instance->error_messages) + assert_msg(instance and memcached_server_error(instance), " "); + if (instance and memcached_server_error(instance)) { rc= memcached_server_error_return(instance); } @@ -139,13 +139,13 @@ pid_t libmemcached_util_getpid2(const char *hostname, in_port_t port, const char } else if (rc == MEMCACHED_SOME_ERRORS) // Generic answer, we will now find the specific reason (if one exists) { - memcached_server_instance_st instance= + const memcached_instance_st * instance= memcached_server_instance_by_position(memc_ptr, 0); #if 0 assert_msg(instance and instance->error_messages, " "); #endif - if (instance and instance->error_messages) + if (instance and memcached_server_error(instance)) { rc= memcached_server_error_return(instance); }