mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fixed invalid quoting for network device names
Quoting needs to be with single quotes, not double quotes. Also single quotes need to be escaped. refs #10544 Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>
This commit is contained in:
parent
4a5a7a7445
commit
2117599eb4
@ -30,6 +30,7 @@
|
||||
#include <IPHlpApi.h>
|
||||
|
||||
#include "check_network.h"
|
||||
#include "boost/algorithm/string/replace.hpp"
|
||||
|
||||
#define VERSION 1.1
|
||||
|
||||
@ -188,7 +189,8 @@ INT printOutput(printInfoStruct& printInfo, CONST std::vector<nInterface>& vInte
|
||||
std::wcout << "\tNo friendly name found, using adapter name\n";
|
||||
wsFriendlyName = it->name;
|
||||
}
|
||||
tss << L"netI=\"" << wsFriendlyName << L"\";in=" << it->BytesInSec << "B/s;out=" << it->BytesOutSec << L"B/s ";
|
||||
boost::algorithm::replace_all(wsFriendlyName, "'", "''");
|
||||
tss << L"netI='" << wsFriendlyName << L"';in=" << it->BytesInSec << "B/s;out=" << it->BytesOutSec << L"B/s ";
|
||||
}
|
||||
|
||||
if (printInfo.warn.rend(tIn + tOut))
|
||||
|
Loading…
x
Reference in New Issue
Block a user