author | Florian Forster <octo@collectd.org> | |
Mon, 15 Aug 2016 17:57:30 +0000 (19:57 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 15 Aug 2016 17:57:30 +0000 (19:57 +0200) |
configure.ac | patch | blob | history | |
src/write_riemann.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index d7e5355a1df06cb489a86ed11a33e7f75c5a2e56..9a6da11dc7ce9c6c8772dfceb4f7c360c889c079 100644 (file)
--- a/configure.ac
+++ b/configure.ac
[with_libnotify="no (pkg-config doesn't know libnotify)"]
)
-PKG_CHECK_MODULES([LIBRIEMANN_CLIENT], [riemann-client >= 1.8.0],
+PKG_CHECK_MODULES([LIBRIEMANN_CLIENT], [riemann-client >= 1.6.0],
[with_libriemann_client="yes"],
[with_libriemann_client="no (pkg-config doesn't know libriemann-client)"])
diff --git a/src/write_riemann.c b/src/write_riemann.c
index 043a06b0a55e9b1dfdf01291f253fc02586ce322..20f2e10b91b50b4fe0165db17dec7ff9b7449ef3 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
node, port);
return -1;
}
+#if RCC_VERSION_NUMBER >= 0x010800
if (host->timeout.tv_sec != 0) {
if (riemann_client_set_timeout(host->client, &host->timeout) != 0) {
riemann_client_free(host->client);
return -1;
}
}
+#endif
set_sock_opts(riemann_client_get_fd(host->client));
if (status != 0)
break;
} else if (strcasecmp("Timeout", child->key) == 0) {
+#if RCC_VERSION_NUMBER >= 0x010800
status = cf_util_get_int(child, (int *)&host->timeout.tv_sec);
if (status != 0)
break;
+#else
+ WARNING("write_riemann plugin: The Timeout option is not supported. Please upgrade the Riemann client to at least 1.8.0.");
+#endif
} else if (strcasecmp("Port", child->key) == 0) {
host->port = cf_util_get_port_number(child);
if (host->port == -1) {