Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions devOpcuaSup/iocshIntegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include <cstdlib>
#include <regex>
#include <winsock2.h>
// cannot use : to separate command line arguments as it matches C: in file paths
#define ARGSEP ';'
#else
#define ARGSEP ':'
#endif

#include <iocsh.h>
Expand Down Expand Up @@ -147,7 +151,7 @@ opcuaSessionCallFunc(const iocshArgBuf *args)

std::list<std::pair<std::string, std::string>> setopts;
for (int i = 1; i < args[2].aval.ac; i++) {
auto options = splitString(args[2].aval.av[i], ':');
auto options = splitString(args[2].aval.av[i], ARGSEP);
for (auto &opt : options) {
if (opt.empty()) continue;
auto keyval = splitString(opt, '=');
Expand Down Expand Up @@ -252,7 +256,7 @@ static

std::list<std::pair<std::string, std::string>> setopts;
for (int i = 1; i < args[3].aval.ac; i++) {
auto options = splitString(args[3].aval.av[i], ':');
auto options = splitString(args[3].aval.av[i], ARGSEP);
for (auto &opt : options) {
if (opt.empty()) continue;
auto keyval = splitString(opt, '=');
Expand Down Expand Up @@ -320,7 +324,7 @@ opcuaOptionsCallFunc(const iocshArgBuf *args)
if (sessions.size()) {
foundSomething = true;
for (int i = 1; i < args[1].aval.ac; i++) {
auto options = splitString(args[1].aval.av[i], ':');
auto options = splitString(args[1].aval.av[i], ARGSEP);
for (auto &opt : options) {
if (opt.empty()) continue;
auto keyval = splitString(opt, '=');
Expand All @@ -339,7 +343,7 @@ opcuaOptionsCallFunc(const iocshArgBuf *args)
if (subscriptions.size()) {
foundSomething = true;
for (int i = 1; i < args[1].aval.ac; i++) {
auto options = splitString(args[1].aval.av[i], ':');
auto options = splitString(args[1].aval.av[i], ARGSEP);
for (auto &opt : options) {
if (opt.empty()) continue;
auto keyval = splitString(opt, '=');
Expand Down