From df6e8b254897a8c24c20518ee3cb7635e8eb2324 Mon Sep 17 00:00:00 2001 From: Will Sobel Date: Tue, 4 Jun 2024 14:30:11 +0200 Subject: [PATCH] fixed service startup configuration for windows --- src/mtconnect/configuration/service.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mtconnect/configuration/service.cpp b/src/mtconnect/configuration/service.cpp index 2f548585..557c6d9e 100644 --- a/src/mtconnect/configuration/service.cpp +++ b/src/mtconnect/configuration/service.cpp @@ -575,9 +575,8 @@ namespace mtconnect { boost::optional command; boost::optional config; - const char *argp[3] = {"run", nullptr, nullptr}; - argp[1] = (char *)configFile; - auto options = g_service->parseOptions(1, argp, command, config); + const char *argp[3] = {"agent", "run", (const char *) configFile}; + auto options = g_service->parseOptions(3, argp, command, config); g_service->initialize(options); // Report running status when initialization is complete.