return MEMCACHED_SUCCESS;
}
+static memcached_return_t dump_server_information(const memcached_st *ptr __attribute__((unused)),
+ const memcached_server_st *instance,
+ void *context)
+{
+ /* Do Nothing */
+ FILE *stream= (FILE *)context;
+
+ fprintf(stream, "Memcached Server: %s %u Version %d.%d.%d\n",
+ memcached_server_name(instance),
+ memcached_server_port(instance),
+ instance->major_version,
+ instance->minor_version,
+ instance->micro_version);
+
+ return MEMCACHED_SUCCESS;
+}
+
static test_return_t server_sort_test(memcached_st *ptr __attribute__((unused)))
{
size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
test_true(if_successful == true);
if_successful= libmemcached_util_version_check(memc, 9, 9, 9);
+
+ if (! if_successful)
+ {
+ memcached_server_fn callbacks[1];
+ memcached_version(memc);
+
+ memcached_version(memc);
+
+ callbacks[0]= dump_server_information;
+ memcached_server_cursor(memc, callbacks, (void *)stderr, 1);
+ }
test_true(if_successful == false);
memcached_server_instance_st instance=
test_false(value);
test_true(len == 0);
- test_true(rc == MEMCACHED_ERRNO);
+ test_false(rc == MEMCACHED_SUCCESS);
memcached_free(tl_memc_h);
test_false(value);
test_true(len == 0);
- test_true(rc == MEMCACHED_ERRNO);
+ test_false(rc == MEMCACHED_SUCCESS);
memcached_free(tl_memc_h);