X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fmemcached.cc;h=3b63c0fc485e08f63c077879ff844e0ae203dae8;hb=751648e3a8c17e6f5bbe223a1213b537b5708871;hp=e3d90947a2c0e1b99a5395dbb94f0942d27122f4;hpb=28602fd2f5f1c758b50cd82d4545da8e6c55f5c7;p=awesomized%2Flibmemcached diff --git a/libtest/memcached.cc b/libtest/memcached.cc index e3d90947..3b63c0fc 100644 --- a/libtest/memcached.cc +++ b/libtest/memcached.cc @@ -77,29 +77,30 @@ public: { Wait wait(pid_file(), 0); - if (not wait.successful()) + if (error_is_ok and not wait.successful()) { Error << "Pidfile was not found:" << pid_file(); return -1; } } + pid_t local_pid; memcached_return_t rc; if (has_socket()) { - _pid= libmemcached_util_getpid(socket().c_str(), port(), &rc); + local_pid= libmemcached_util_getpid(socket().c_str(), port(), &rc); } else { - _pid= libmemcached_util_getpid(hostname().c_str(), port(), &rc); + local_pid= libmemcached_util_getpid(hostname().c_str(), port(), &rc); } - if ((memcached_failed(rc) or _pid < 1) and not error_is_ok) + if (error_is_ok and ((memcached_failed(rc) or local_pid < 1))) { - Error << "libmemcached_util_getpid(" << memcached_strerror(NULL, rc) << ") pid: " << _pid << " for:" << *this; + Error << "libmemcached_util_getpid(" << memcached_strerror(NULL, rc) << ") pid: " << local_pid << " for:" << *this; } - return _pid; + return local_pid; } bool ping()