projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
c++: fix -Wformat
[awesomized/libmemcached]
/
libtest
/
gearmand.cc
diff --git
a/libtest/gearmand.cc
b/libtest/gearmand.cc
index 8106bec4b0a971f2b3529d5081497c1245b21c8d..852cf19496e829c88cbbc311378d876f97507434 100644
(file)
--- a/
libtest/gearmand.cc
+++ b/
libtest/gearmand.cc
@@
-34,15
+34,11
@@
*
*/
*
*/
-#include "
mem_config
.h"
+#include "
libtest/yatlcon
.h"
#include <libtest/common.h>
#include <libtest/gearmand.h>
#include <libtest/common.h>
#include <libtest/gearmand.h>
-#include "util/instance.hpp"
-#include "util/operation.hpp"
-
-using namespace datadifferential;
using namespace libtest;
#include <cassert>
using namespace libtest;
#include <cassert>
@@
-71,6
+67,8
@@
public:
bool ping()
{
bool ping()
{
+ reset_error();
+
if (out_of_ban_killed())
{
return false;
if (out_of_ban_killed())
{
return false;
@@
-79,7
+77,14
@@
public:
SimpleClient client(_hostname, _port);
std::string response;
SimpleClient client(_hostname, _port);
std::string response;
- return client.send_message("version", response);
+ bool ret= client.send_message("version", response);
+
+ if (client.is_error())
+ {
+ error(client.error());
+ }
+
+ return ret;
}
const char *name()
}
const char *name()
@@
-118,7
+123,7
@@
public:
return true;
}
return true;
}
- bool build(
size_t argc, const char *argv[]
);
+ bool build();
};
Gearmand::Gearmand(const std::string& host_arg, in_port_t port_arg, bool libtool_, const char* binary_arg) :
};
Gearmand::Gearmand(const std::string& host_arg, in_port_t port_arg, bool libtool_, const char* binary_arg) :
@@
-127,7
+132,7
@@
Gearmand::Gearmand(const std::string& host_arg, in_port_t port_arg, bool libtool
set_pid_file();
}
set_pid_file();
}
-bool Gearmand::build(
size_t argc, const char *argv[]
)
+bool Gearmand::build()
{
if (getuid() == 0 or geteuid() == 0)
{
{
if (getuid() == 0 or geteuid() == 0)
{
@@
-136,11
+141,6
@@
bool Gearmand::build(size_t argc, const char *argv[])
add_option("--listen=localhost");
add_option("--listen=localhost");
- for (size_t x= 0 ; x < argc ; x++)
- {
- add_option(argv[x]);
- }
-
return true;
}
return true;
}
@@
-150,8
+150,13
@@
libtest::Server *build_gearmand(const char *hostname, in_port_t try_port, const
{
if (binary == NULL)
{
{
if (binary == NULL)
{
-#if defined(GEARMAND_BINARY)
- binary= GEARMAND_BINARY;
+#if defined(HAVE_GEARMAND_BINARY)
+# if defined(GEARMAND_BINARY)
+ if (HAVE_GEARMAND_BINARY)
+ {
+ binary= GEARMAND_BINARY;
+ }
+# endif
#endif
}
#endif
}