Skip to content

Commit 41f3ddd

Browse files
committed
[occ] Special case autoBind to be pushed as bool
1 parent 63f13c3 commit 41f3ddd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

occ/plugin/OccFMQCommon.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,14 @@ std::tuple<OccLite::nopb::TransitionResponse, ::grpc::Status> doTransition(fair:
100100
boost::split(split, key, std::bind(std::equal_to<>(), '.', std::placeholders::_1));
101101
if (std::find(intKeys.begin(), intKeys.end(), split.back()) != intKeys.end()) {
102102
auto intValue = std::stoi(value);
103-
m_pluginServices->SetProperty(key, intValue);
104-
OLOG(debug) << "SetProperty(chan int) called " << key << ":" << intValue;
103+
if (boost::ends_with(key, "autoBind")) {
104+
auto boolValue = static_cast<bool>(intValue);
105+
m_pluginServices->SetProperty(key, boolValue);
106+
OLOG(debug) << "SetProperty(chan bool) called " << key << ":" << intValue;
107+
} else {
108+
m_pluginServices->SetProperty(key, intValue);
109+
OLOG(debug) << "SetProperty(chan int) called " << key << ":" << intValue;
110+
}
105111
} else {
106112
m_pluginServices->SetProperty(key, value);
107113
OLOG(debug) << "SetProperty(chan string) called " << key << ":" << value;

0 commit comments

Comments
 (0)