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

Remove unused default from PropertyNames.xml #3223

Merged
merged 2 commits into from
Dec 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
7 changes: 4 additions & 3 deletions config/PropertyNames.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<property name="Address" languages="cpp,csharp,java"/>
<property name="Port" languages="cpp,csharp,java" default="4061"/>
<property name="Interface" languages="cpp,csharp,java" />
<property name="DomainId" languages="cpp,csharp,java" default=""/>
<property name="DomainId" languages="cpp,csharp,java" />
</section>

<section name="IceLocatorDiscovery" opt-in="false">
Expand Down Expand Up @@ -225,7 +225,7 @@
<property name="Replica" languages="cpp" />
<property name="Host" languages="cpp" />
<property name="Port" languages="cpp" />
<property name="InstanceName" default="" languages="cpp" />
<property name="InstanceName" languages="cpp" />
<property name="Server" class="ObjectAdapter" languages="cpp" />
<property name="Discovery.Address" languages="cpp" />
<property name="Discovery.Interface" languages="cpp" />
Expand All @@ -238,7 +238,8 @@

<section name="IceGrid" opt-in="true">
<property name="AdminRouter" class="ObjectAdapter" languages="cpp" />
<property name="InstanceName" languages="cpp" default="IceGrid" />
<!-- The default for InstanceName is computed and eventually falls back to 'IceGrid' -->
<property name="InstanceName" languages="cpp" />
<property name="Node" class="ObjectAdapter" languages="cpp" />
<property name="Node.AllowRunningServersAsRoot" languages="cpp" />
<property name="Node.AllowEndpointsOverride" languages="cpp" default="0"/>
Expand Down
16 changes: 8 additions & 8 deletions cpp/src/Glacier2/Glacier2Router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ RouterService::start(int argc, char* argv[], int& status)
if (!nowarn)
{
ServiceWarning warn(this);
warn << "unable to contact permissions verifier `" << properties->getProperty(verifierProperty) << "'\n"
warn << "unable to contact permissions verifier `" << properties->getIceProperty(verifierProperty) << "'\n"
<< ex;
}
}
catch (const std::exception& ex)
{
ServiceError err(this);
err << "permissions verifier `" << properties->getProperty(verifierProperty) << "' is invalid:\n" << ex;
err << "permissions verifier `" << properties->getIceProperty(verifierProperty) << "' is invalid:\n" << ex;
return false;
}

Expand All @@ -217,14 +217,14 @@ RouterService::start(int argc, char* argv[], int& status)
if (!nowarn)
{
ServiceWarning warn(this);
warn << "unable to contact session manager `" << properties->getProperty(sessionManagerProperty) << "'\n"
warn << "unable to contact session manager `" << properties->getIceProperty(sessionManagerProperty) << "'\n"
<< ex;
}
}
catch (const std::exception& ex)
{
ServiceError err(this);
err << "session manager `" << properties->getProperty(sessionManagerProperty) << "' is invalid:\n" << ex;
err << "session manager `" << properties->getIceProperty(sessionManagerProperty) << "' is invalid:\n" << ex;
return false;
}

Expand All @@ -246,15 +246,15 @@ RouterService::start(int argc, char* argv[], int& status)
if (!nowarn)
{
ServiceWarning warn(this);
warn << "unable to contact ssl permissions verifier `" << properties->getProperty(sslVerifierProperty)
warn << "unable to contact ssl permissions verifier `" << properties->getIceProperty(sslVerifierProperty)
<< "'\n"
<< ex;
}
}
catch (const std::exception& ex)
{
ServiceError err(this);
err << "ssl permissions verifier `" << communicator()->getProperties()->getProperty(sslVerifierProperty)
err << "ssl permissions verifier `" << communicator()->getProperties()->getIceProperty(sslVerifierProperty)
<< "' is invalid:\n"
<< ex;
return false;
Expand Down Expand Up @@ -286,15 +286,15 @@ RouterService::start(int argc, char* argv[], int& status)
if (!nowarn)
{
ServiceWarning warn(this);
warn << "unable to contact ssl session manager `" << properties->getProperty(sslSessionManagerProperty)
warn << "unable to contact ssl session manager `" << properties->getIceProperty(sslSessionManagerProperty)
<< "'\n"
<< ex;
}
}
catch (const std::exception& ex)
{
ServiceError err(this);
err << "ssl session manager `" << properties->getProperty(sslSessionManagerProperty) << "' is invalid:\n" << ex;
err << "ssl session manager `" << properties->getIceProperty(sslSessionManagerProperty) << "' is invalid:\n" << ex;
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/PropertyNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ const PropertyArray PropertyNames::IceGridAdminProps
const Property IceGridPropsData[] =
{
Property{"AdminRouter", "", false, false, &PropertyNames::ObjectAdapterProps},
Property{"InstanceName", "IceGrid", false, false, nullptr},
Property{"InstanceName", "", false, false, nullptr},
Property{"Node", "", false, false, &PropertyNames::ObjectAdapterProps},
Property{"Node.AllowRunningServersAsRoot", "", false, false, nullptr},
Property{"Node.AllowEndpointsOverride", "0", false, false, nullptr},
Expand Down
5 changes: 2 additions & 3 deletions cpp/src/IceGrid/IceGridNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,8 @@ NodeService::startImpl(int argc, char* argv[], int& status)
//
_timer = make_shared<IceInternal::Timer>();

// The IceGrid instance name. We can't use getIceProperty as we don't want to get any default values.
string instanceName = properties->getProperty("IceGrid.InstanceName");
if (instanceName.empty())
string instanceName = properties->getIceProperty("IceGrid.InstanceName");
if (instanceName.empty()) // not set explicitly
{
instanceName = properties->getProperty("IceLocatorDiscovery.InstanceName");
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/IceGrid/RegistryI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ RegistryI::startImpl()
//
// Get the instance name
//
_instanceName = properties->getProperty("IceGrid.InstanceName");
if (_instanceName.empty())
_instanceName = properties->getIceProperty("IceGrid.InstanceName");
if (_instanceName.empty()) // not set explicitly
{
_instanceName = properties->getProperty("IceLocatorDiscovery.InstanceName");
}
Expand Down
Loading