projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Remove dead configure.ac issues.
[m6w6/libmemcached]
/
libmemcached
/
sasl.cc
diff --git
a/libmemcached/sasl.cc
b/libmemcached/sasl.cc
index 77c5fdf7b664295df1c6a1e97e79b862e22f340d..ce61e3182f93421c5d1fc7c562d957e467df50a5 100644
(file)
--- a/
libmemcached/sasl.cc
+++ b/
libmemcached/sasl.cc
@@
-40,7
+40,10
@@
#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
+#if defined(HAVE_LIBSASL) && HAVE_LIBSASL
#include <sasl/sasl.h>
#include <sasl/sasl.h>
+#endif
+
#include <pthread.h>
void memcached_set_sasl_callbacks(memcached_st *ptr,
#include <pthread.h>
void memcached_set_sasl_callbacks(memcached_st *ptr,
@@
-133,9
+136,10
@@
memcached_return_t memcached_sasl_authenticate_connection(memcached_server_st *s
}
/* SANITY CHECK: SASL can only be used with the binary protocol */
}
/* SANITY CHECK: SASL can only be used with the binary protocol */
- if (
server->root->flags.binary_protocol
== false)
+ if (
memcached_is_binary(server->root)
== false)
{
{
- return MEMCACHED_PROTOCOL_ERROR;
+ return memcached_set_error(*server, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT,
+ memcached_literal_param("memcached_sasl_authenticate_connection() is not supported via the ASCII protocol"));
}
/* Try to get the supported mech from the server. Servers without SASL
}
/* Try to get the supported mech from the server. Servers without SASL