summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7462c56)
raw | patch | inline | side by side (parent: 7462c56)
author | Kevin Bowling <kevin.bowling@kev009.com> | |
Wed, 13 Aug 2014 08:21:11 +0000 (01:21 -0700) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 13 Aug 2014 12:07:24 +0000 (14:07 +0200) |
src/write_tsdb.c | patch | blob | history |
diff --git a/src/write_tsdb.c b/src/write_tsdb.c
index bf83560cf32dcca9eb63f7f64508f6c79cfa31e5..9dff2904fbff14e81cca8dff62a5faf8d6cb800e 100644 (file)
--- a/src/write_tsdb.c
+++ b/src/write_tsdb.c
char *node;
char *service;
char *host_tags;
- char escape_char;
_Bool store_rates;
- _Bool separate_instances;
_Bool always_append_ds;
char send_buf[WT_SEND_BUF_SIZE];
return status;
}
-static int config_set_char(char *dest,
- oconfig_item_t *ci)
-{
- char buffer[4];
- int status;
-
- memset(buffer, 0, sizeof(buffer));
-
- status = cf_util_get_string_buffer(ci, buffer, sizeof(buffer));
- if (status != 0)
- return (status);
-
- if (buffer[0] == 0)
- {
- ERROR("write_tsdb plugin: Cannot use an empty string for the "
- "\"EscapeCharacter\" option.");
- return -1;
- }
-
- if (buffer[1] != 0)
- {
- WARNING("write_tsdb plugin: Only the first character of the "
- "\"EscapeCharacter\" option ('%c') will be used.",
- (int) buffer[0]);
- }
-
- *dest = buffer[0];
-
- return 0;
-}
-
static int wt_config_tsd(oconfig_item_t *ci)
{
struct wt_callback *cb;
cb->node = NULL;
cb->service = NULL;
cb->host_tags = NULL;
- cb->escape_char = WT_DEFAULT_ESCAPE;
- cb->store_rates = 1;
+ cb->store_rates = 0;
pthread_mutex_init (&cb->send_lock, NULL);
cf_util_get_string(child, &cb->host_tags);
else if (strcasecmp("StoreRates", child->key) == 0)
cf_util_get_boolean(child, &cb->store_rates);
- else if (strcasecmp("SeparateInstances", child->key) == 0)
- cf_util_get_boolean(child, &cb->separate_instances);
else if (strcasecmp("AlwaysAppendDS", child->key) == 0)
cf_util_get_boolean(child, &cb->always_append_ds);
- else if (strcasecmp("EscapeCharacter", child->key) == 0)
- config_set_char(&cb->escape_char, child);
else
{
ERROR("write_tsdb plugin: Invalid configuration "