}
}
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
static char *username;
static char *passwd;
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
static int get_username(void *context, int id, const char **result,
unsigned int *len)
{
#else
(void)memc;
(void)user;
- (void)passwd;
+ (void)password;
#endif
return true;
void shutdown_sasl(void)
{
-#if LIBMEMCACHED_WITH_SASL_SUPPORT
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
if (username != NULL || passwd != NULL)
sasl_done();
#endif
*/
static test_return_t sasl_auth_test(memcached_st *memc)
{
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
memcached_return_t rc;
rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0);
memcached_quit(memc);
return TEST_SUCCESS;
+#else
+ (void)memc;
+ return TEST_FAILURE;
+#endif
}
/* Clean the server before beginning testing */
{0, 0, (test_callback_fn)0}
};
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
test_st sasl_auth_tests[]= {
{"sasl_auth", 1, (test_callback_fn)sasl_auth_test },
{0, 0, (test_callback_fn)0}
};
-#endif
test_st ketama_compatibility[]= {
{"libmemcached", 1, (test_callback_fn)ketama_compatibility_libmemcached },