diff options
author | claiff <claiff@mail.ru> | 2022-09-19 22:48:25 +0300 |
---|---|---|
committer | claiff <claiff@mail.ru> | 2022-09-19 22:48:25 +0300 |
commit | 011e19815b201acf19b5a4208ec6acd41ca995f3 (patch) | |
tree | 9ce2a828bfb4399b09e902cd70298f0963867269 | |
parent | 7e156f58e74baaf4f1d7ccb4df629e6e1a26a32e (diff) | |
download | obmc-sila-smtp-011e19815b201acf19b5a4208ec6acd41ca995f3.tar.xz |
fix problem with boolean settingsbugfix/boolean_settings
-rw-r--r-- | src/converter/file.cpp | 6 | ||||
-rw-r--r-- | src/converter/settings.cpp | 4 | ||||
-rw-r--r-- | src/converter/string.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/converter/file.cpp b/src/converter/file.cpp index 203cca9..a33381f 100644 --- a/src/converter/file.cpp +++ b/src/converter/file.cpp @@ -18,14 +18,14 @@ namespace smtp::converter void File::ApplyAuth( manage::SettingsFields &result, manage::SettingsFileDataType const& from ) const { - static const std::string FIELD = "need_auth"; + static const std::string FIELD = "is_need_auth"; ApplyBool(from, FIELD, result.is_need_auth); } void File::ApplySsl( manage::SettingsFields &result, manage::SettingsFileDataType const& from ) const { - static const std::string FIELD = "need_ssl"; + static const std::string FIELD = "is_need_ssl"; ApplyBool(from, FIELD, result.is_need_ssl); } @@ -44,7 +44,7 @@ namespace smtp::converter { return; } - field = ( find->second == TRUE_AS_STRING ) ? true : false; + field = (find->second == TRUE_AS_STRING); } void File::ApplyUsername( manage::SettingsFields &result, manage::SettingsFileDataType const& from ) const diff --git a/src/converter/settings.cpp b/src/converter/settings.cpp index 7aa2106..10ed310 100644 --- a/src/converter/settings.cpp +++ b/src/converter/settings.cpp @@ -19,7 +19,7 @@ namespace smtp::converter void Settings::ApplyAuth( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const { - static const std::string FIELD = "need_auth"; + static const std::string FIELD = "is_need_auth"; static const std::string TRUE_AS_STRING = "true"; static const std::string FALSE_AS_STRING = "false"; @@ -28,7 +28,7 @@ namespace smtp::converter void Settings::ApplySsl( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const { - static const std::string FIELD = "need_ssl"; + static const std::string FIELD = "is_need_ssl"; static const std::string TRUE_AS_STRING = "true"; static const std::string FALSE_AS_STRING = "false"; diff --git a/src/converter/string.cpp b/src/converter/string.cpp index cbdc544..149d8b6 100644 --- a/src/converter/string.cpp +++ b/src/converter/string.cpp @@ -18,14 +18,14 @@ namespace smtp::converter void String::ApplyAuth( manage::SettingsFields const& from, std::string& result ) const { - static const std::string FIELD = "need_auth"; + static const std::string FIELD = "is_need_auth"; result += GetBoolParam( FIELD, from.is_need_auth); } void String::ApplySsl( manage::SettingsFields const& from, std::string& result ) const { - static const std::string FIELD = "need_ssl"; + static const std::string FIELD = "is_need_ssl"; result += GetBoolParam( FIELD, from.is_need_ssl); } |