Fix m4 warnings, and fix a couple of issues around include files.
[m6w6/libmemcached] / libtest / memcached.cc
index 05f43975c2c9134a2f41f86ee92fedbcecaa2583..fc7a37c693bafa2a1af53405d017a89b4c315a81 100644 (file)
@@ -98,7 +98,12 @@ public:
     memcached_return_t rc= MEMCACHED_SUCCESS;
     if (has_socket())
     {
-      local_pid= libmemcached_util_getpid(socket().c_str(), 0, &rc);
+      if (socket().empty())
+      {
+        return -1;
+      }
+
+      local_pid= libmemcached_util_getpid(socket().c_str(), port(), &rc);
     }
     else
     {