char errbuf[1024];
ERROR("memcached plugin: memcached_connect_unix: socket(2) failed: %s",
sstrerror(errno, errbuf, sizeof(errbuf)));
char errbuf[1024];
ERROR("memcached plugin: memcached_connect_unix: socket(2) failed: %s",
sstrerror(errno, errbuf, sizeof(errbuf)));
st->connhost, st->connport,
(status == EAI_SYSTEM) ? sstrerror(errno, errbuf, sizeof(errbuf))
: gai_strerror(status));
st->connhost, st->connport,
(status == EAI_SYSTEM) ? sstrerror(errno, errbuf, sizeof(errbuf))
: gai_strerror(status));
} /* int memcached_query_daemon */
static void memcached_init_vl(value_list_t *vl, memcached_t const *st) {
} /* int memcached_query_daemon */
static void memcached_init_vl(value_list_t *vl, memcached_t const *st) {
if ((strcmp("127.0.0.1", st->host) == 0) ||
(strcmp("localhost", st->host) == 0))
if ((strcmp("127.0.0.1", st->host) == 0) ||
(strcmp("localhost", st->host) == 0))
}
}
if (st->connport == NULL) {
st->connport = strdup(MEMCACHED_DEF_PORT);
if (st->connport == NULL)
}
}
if (st->connport == NULL) {
st->connport = strdup(MEMCACHED_DEF_PORT);
if (st->connport == NULL)
st = calloc(1, sizeof(*st));
if (st == NULL) {
ERROR("memcached plugin: calloc failed.");
st = calloc(1, sizeof(*st));
if (st == NULL) {
ERROR("memcached plugin: calloc failed.");
} else if (!have_instance_block) {
/* Non-instance option: Assume legacy configuration (without <Instance />
* blocks) and call config_add_instance() with the <Plugin /> block. */
} else if (!have_instance_block) {
/* Non-instance option: Assume legacy configuration (without <Instance />
* blocks) and call config_add_instance() with the <Plugin /> block. */
/* No instances were configured, lets start a default instance. */
st = calloc(1, sizeof(*st));
if (st == NULL)
/* No instances were configured, lets start a default instance. */
st = calloc(1, sizeof(*st));
if (st == NULL)