Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed regex for URL parsing. #474

Merged
merged 7 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set(AGENT_VERSION_MAJOR 2)
set(AGENT_VERSION_MINOR 3)
set(AGENT_VERSION_PATCH 0)
set(AGENT_VERSION_BUILD 15)
set(AGENT_VERSION_BUILD 16)
set(AGENT_VERSION_RC "")

# This minimum version is to support Visual Studio 2019 and C++ feature checking and FetchContent
Expand Down
4 changes: 2 additions & 2 deletions src/mtconnect/configuration/agent_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ namespace mtconnect::configuration {
string host, protocol, path;
auto url = *GetOption<string>(options, configuration::Url);

boost::regex pat("^([^:]+)://([^:/]+)(:[0-9]+)?(/.+)?");
boost::regex pat("^([^:]+)://([^:/]+)(:[0-9]+)?/?(.+)?");
boost::match_results<string::const_iterator> match;
if (boost::regex_match(url, match, pat))
{
Expand Down Expand Up @@ -979,7 +979,7 @@ namespace mtconnect::configuration {
device = getDefaultDevice();
if (device)
{
deviceName = *device->getComponentName();
deviceName = *device->getUuid();
adapterOptions[configuration::Device] = deviceName;
LOG(info) << "Assigning default device " << deviceName << " to adapter";
}
Expand Down
Loading