Skip to content

Commit 082a8b3

Browse files
committed
nutconf-related C++ sources: fix typo in source var names: hotSync => hostSync
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent 44b1943 commit 082a8b3

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

common/nutconf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ void UpsmonConfigParser::onParseDirective(const std::string& directiveName, char
12331233
{
12341234
if(values.size()>0)
12351235
{
1236-
_config->hotSync = StringToSettableNumber<unsigned int>(values.front());
1236+
_config->hostSync = StringToSettableNumber<unsigned int>(values.front());
12371237
}
12381238
}
12391239
else if(directiveName == "DEADTIME")

common/nutwriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ NutWriter::status_t UpsmonConfigWriter::writeConfig(const UpsmonConfiguration &
445445
UPSMON_DIRECTIVEX("MINSUPPLIES", unsigned int, config.minSupplies, false);
446446
UPSMON_DIRECTIVEX("POLLFREQ", unsigned int, config.poolFreq, false);
447447
UPSMON_DIRECTIVEX("POLLFREQALERT", unsigned int, config.poolFreqAlert, false);
448-
UPSMON_DIRECTIVEX("HOSTSYNC", unsigned int, config.hotSync, false);
448+
UPSMON_DIRECTIVEX("HOSTSYNC", unsigned int, config.hostSync, false);
449449
UPSMON_DIRECTIVEX("DEADTIME", unsigned int, config.deadTime, false);
450450
UPSMON_DIRECTIVEX("RBWARNTIME", unsigned int, config.rbWarnTime, false);
451451
UPSMON_DIRECTIVEX("NOCOMMWARNTIME", unsigned int, config.noCommWarnTime, false);

include/nutconf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ class UpsmonConfiguration : public Serialisable
638638
void parseFromString(const std::string& str);
639639

640640
Settable<std::string> runAsUser, shutdownCmd, notifyCmd, powerDownFlag;
641-
Settable<unsigned int> minSupplies, poolFreq, poolFreqAlert, hotSync;
641+
Settable<unsigned int> minSupplies, poolFreq, poolFreqAlert, hostSync;
642642
Settable<unsigned int> deadTime, rbWarnTime, noCommWarnTime, finalDelay;
643643

644644
enum NotifyFlag {

tests/nutconf_parser_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void NutConfTest::testUpsmonConfigParser()
278278
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find POWERDOWNFLAG '/etc/killpower'", string("/etc/killpower"), *conf.powerDownFlag);
279279
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find POLLFREQ 30", 30u, *conf.poolFreq);
280280
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find POLLFREQALERT 5", 5u, *conf.poolFreqAlert);
281-
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find HOSTSYNC 15", 15u, *conf.hotSync);
281+
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find HOSTSYNC 15", 15u, *conf.hostSync);
282282
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find DEADTIME 15", 15u, *conf.deadTime);
283283
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find RBWARNTIME 43200", 43200u, *conf.rbWarnTime);
284284
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cannot find NOCOMMWARNTIME 300", 300u, *conf.noCommWarnTime);

0 commit comments

Comments
 (0)