if (host->timeout.tv_sec != 0) {
if (riemann_client_set_timeout(host->client, &host->timeout) != 0) {
riemann_client_free(host->client);
if (host->timeout.tv_sec != 0) {
if (riemann_client_set_timeout(host->client, &host->timeout) != 0) {
riemann_client_free(host->client);
c_release(LOG_INFO, &host->init_complaint,
"write_riemann plugin: Successfully connected to %s:%d", node,
c_release(LOG_INFO, &host->init_complaint,
"write_riemann plugin: Successfully connected to %s:%d", node,
if ((host = calloc(1, sizeof(*host))) == NULL) {
ERROR("write_riemann plugin: calloc failed.");
if ((host = calloc(1, sizeof(*host))) == NULL) {
ERROR("write_riemann plugin: calloc failed.");
} else if (strcasecmp("Port", child->key) == 0) {
host->port = cf_util_get_port_number(child);
if (host->port == -1) {
} else if (strcasecmp("Port", child->key) == 0) {
host->port = cf_util_get_port_number(child);
if (host->port == -1) {
ssnprintf(callback_name, sizeof(callback_name), "write_riemann/%s",
host->name);
ssnprintf(callback_name, sizeof(callback_name), "write_riemann/%s",
host->name);