summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-28 03:21:32 +0000
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-28 03:21:32 +0000
commitc045c474a9af21d9edaeba65d694f21375ca44cc (patch)
treee0316a3d37b02166ba9dbb87f44789e15c3cfe5d
parenta2c0d2b629315b32950ee70f266b8ae2cecf6028 (diff)
downloadmonitoring-plugins-c045c474a9af21d9edaeba65d694f21375ca44cc.tar.gz
suppress quotes in perf data when not needed (some plugins need the space to keep below line length limit
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@700 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/utils.c b/plugins/utils.c
index aad30068..5dbdb4de 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -521,7 +521,10 @@ char *perfdata (const char *label,
521{ 521{
522 char *data = NULL; 522 char *data = NULL;
523 523
524 asprintf (&data, "\"%s\"=%ld%s;", label, val, uom); 524 if (index (label, '"'))
525 asprintf (&data, "\"%s\"=%ld%s;", label, val, uom);
526 else
527 asprintf (&data, "%s=%ld%s;", label, val, uom);
525 528
526 if (warnp) 529 if (warnp)
527 asprintf (&data, "%s%ld;", data, warn); 530 asprintf (&data, "%s%ld;", data, warn);