aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/influxdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/influxdb.h')
-rw-r--r--src/plugins/influxdb.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/influxdb.h b/src/plugins/influxdb.h
index 33eb0a2..54af5fc 100644
--- a/src/plugins/influxdb.h
+++ b/src/plugins/influxdb.h
@@ -111,20 +111,22 @@ static inline void concatenate(char* dest, const char* source, const char* sep)
free(esc_source);
}
-static inline void concatenate_str(char* dest, const char* source, const char* sep)
+static inline void concatenate_str(char* dest, const char* source, const char* sep, bool quoteString)
{
char* esc_source;
if (sep)
strncat(dest, sep, strlen(sep));
- strncat(dest, "\"", 1);
+ if (quoteString)
+ strncat(dest, "\"", 2);
esc_source = escape_chr(source, TRUE);
strncat(dest, esc_source, strlen(esc_source));
if (esc_source)
free(esc_source);
- strncat(dest, "\"", 1);
+ if (quoteString)
+ strncat(dest, "\"", 2);
}
extern size_t make_url_db(char* url, size_t l_url, const char* host, const char* port, const char* endpoint, const char *db);