File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -197,18 +197,16 @@ ocpp::types::ConfigurationStatus OcppConfig::setConfiguration(const std::string&
197197 {
198198 if ((it->second & PARAM_WRITE) != 0 )
199199 {
200- std::size_t key_is_interval = key.find (" Interval" );
201- if (key_is_interval != std::string::npos)
202- {
203- std::size_t value_is_negative = key.find (" -" );
204- if (value_is_negative)
205- {
206- ret = ConfigurationStatus::Rejected;
207- }
208- }
200+ if (key.find (" Interval" ) != std::string::npos)
201+ {
202+ if (value.find (" -" ) != std::string::npos)
203+ {
204+ ret = ConfigurationStatus::Rejected;
205+ }
206+ }
209207
210- if (ret != ConfigurationStatus::Rejected)
211- {
208+ if (ret != ConfigurationStatus::Rejected)
209+ {
212210 if ((it->second & PARAM_OCPP) != 0 )
213211 {
214212 m_config.set (OCPP_PARAMS, key, value);
@@ -225,7 +223,7 @@ ocpp::types::ConfigurationStatus OcppConfig::setConfiguration(const std::string&
225223 {
226224 ret = ConfigurationStatus::Accepted;
227225 }
228- }
226+ }
229227 }
230228 else
231229 {
You can’t perform that action at this time.
0 commit comments