[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] metrics: Need to surround label value with double quotes



commit e3f5dc1fd35f14196f351a8b3a5f66f872c02fcf
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Wed May 12 13:24:22 2021 -0400

    metrics: Need to surround label value with double quotes
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/lib/metrics/metrics_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/metrics/metrics_common.c b/src/lib/metrics/metrics_common.c
index c0352b6646..f3f7e22d88 100644
--- a/src/lib/metrics/metrics_common.c
+++ b/src/lib/metrics/metrics_common.c
@@ -37,6 +37,6 @@ const char *
 metrics_format_label(const char *key, const char *value)
 {
   static char buf[128];
-  tor_snprintf(buf, sizeof(buf), "%s=%s", key, value);
+  tor_snprintf(buf, sizeof(buf), "%s=\"%s\"", key, value);
   return buf;
 }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits