mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-08 16:26:23 -04:00
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
This commit is contained in:
parent
a2c0d2b629
commit
c045c474a9
1 changed files with 4 additions and 1 deletions
|
|
@ -521,7 +521,10 @@ char *perfdata (const char *label,
|
|||
{
|
||||
char *data = NULL;
|
||||
|
||||
asprintf (&data, "\"%s\"=%ld%s;", label, val, uom);
|
||||
if (index (label, '"'))
|
||||
asprintf (&data, "\"%s\"=%ld%s;", label, val, uom);
|
||||
else
|
||||
asprintf (&data, "%s=%ld%s;", label, val, uom);
|
||||
|
||||
if (warnp)
|
||||
asprintf (&data, "%s%ld;", data, warn);
|
||||
|
|
|
|||
Loading…
Reference in a new issue