projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Update yatl.
[awesomized/libmemcached]
/
libtest
/
memcached.cc
diff --git
a/libtest/memcached.cc
b/libtest/memcached.cc
index 717ccb698499c550df8824f603d52d456142f2c3..2c150f9048a620fc7dcbf1d0831c624997a0a4d7 100644
(file)
--- a/
libtest/memcached.cc
+++ b/
libtest/memcached.cc
@@
-214,6
+214,11
@@
bool Memcached::build(size_t argc, const char *argv[])
for (size_t x= 0 ; x < argc ; x++)
{
for (size_t x= 0 ; x < argc ; x++)
{
+ if (argv[x] == NULL)
+ {
+ break;
+ }
+
add_option(argv[x]);
}
add_option(argv[x]);
}
@@
-222,23
+227,22
@@
bool Memcached::build(size_t argc, const char *argv[])
libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port)
{
libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port)
{
- return new Memcached(hostname, try_port, false);
-}
+ if (HAVE_MEMCACHED_BINARY)
+ {
+ return new Memcached(hostname, try_port, false);
+ }
-libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port)
-{
- return new Memcached(socket_file, try_port, true);
+ return NULL;
}
}
-libtest::Server *build_memcached_s
asl(const std::string& hostname, const in_port_t try_port, const std::string& username, const std::string &password
)
+libtest::Server *build_memcached_s
ocket(const std::string& socket_file, const in_port_t try_port
)
{
{
- if (
username.empty()
)
+ if (
HAVE_MEMCACHED_BINARY
)
{
{
- return new Memcached(
hostname, try_port, false, "memcached", "memcached"
);
+ return new Memcached(
socket_file, try_port, true
);
}
}
- return
new Memcached(hostname, try_port, false, username, password)
;
+ return
NULL
;
}
} // namespace libtest
}
} // namespace libtest
-