Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 2718-swift-ice-ami-fa…
Browse files Browse the repository at this point in the history
…ilure
  • Loading branch information
externl committed Oct 31, 2024
2 parents 28091b1 + e5261ff commit 0bba38b
Show file tree
Hide file tree
Showing 31 changed files with 216 additions and 119 deletions.
13 changes: 9 additions & 4 deletions config/makeprops.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ def openFiles(self):
{{
const char* name;
const bool prefixOnly;
const bool isOptIn;
const Property* properties;
const int length;
const bool isOptIn;
}};
class PropertyNames
Expand Down Expand Up @@ -330,9 +330,9 @@ def writePropertyArray(self, propertyArray):
{{
.name="{name}",
.prefixOnly={prefixOnly},
.isOptIn={isOptIn},
.properties={name}PropsData,
.length={len(propertyArray.properties)},
.isOptIn={isOptIn}
.length={len(propertyArray.properties)}
}};
""")
Expand Down Expand Up @@ -408,6 +408,7 @@ def fix(self, propertyName):
def writePropertyArray(self, propertyArray):
name = propertyArray.name
prefixOnly = "true" if propertyArray.prefixOnly else "false"
isOptIn = "true" if propertyArray.isOptIn else "false"
properties = (
"\n " + ",\n ".join(propertyArray.properties)
if propertyArray.properties
Expand All @@ -418,6 +419,7 @@ def writePropertyArray(self, propertyArray):
f""" public static final PropertyArray {name}Props = new PropertyArray(
"{name}",
{prefixOnly},
{isOptIn},
new Property[] {{{properties}
}});
Expand Down Expand Up @@ -505,6 +507,7 @@ def fix(self, propertyName):
def writePropertyArray(self, propertyArray):
name = propertyArray.name
prefixOnly = "true" if propertyArray.prefixOnly else "false"
isOptIn = "true" if propertyArray.isOptIn else "false"
properties = (
f"\n {",\n ".join(propertyArray.properties)}\n "
if propertyArray.properties
Expand All @@ -515,6 +518,7 @@ def writePropertyArray(self, propertyArray):
internal static PropertyArray {name}Props = new(
"{name}",
{prefixOnly},
{isOptIn},
[{properties}]);
""")
Expand Down Expand Up @@ -583,6 +587,7 @@ def fix(self, propertyName):
def writePropertyArray(self, propertyArray):
name = propertyArray.name
prefixOnly = "true" if propertyArray.prefixOnly else "false"
isOptIn = "true" if propertyArray.isOptIn else "false"
properties = (
"\n " + ",\n ".join(propertyArray.properties)
if propertyArray.properties
Expand All @@ -591,7 +596,7 @@ def writePropertyArray(self, propertyArray):
# We assign the properties to the property array after creating it so that we can reference the array
# in the properties themselves
self.srcFile.write(f"""\
PropertyNames.{name}Props = new PropertyArray("{name}", {prefixOnly});
PropertyNames.{name}Props = new PropertyArray("{name}", {prefixOnly}, {isOptIn});
PropertyNames.{name}Props.properties = [{properties}
];
Expand Down
13 changes: 6 additions & 7 deletions cpp/src/Ice/ObjectAdapterI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ Ice::ObjectAdapterI::destroy() noexcept
//
// Remove object references (some of them cyclic).
//
_instance = 0;
_threadPool = 0;
_routerInfo = 0;
_instance = nullptr;
_threadPool = nullptr;
_routerInfo = nullptr;
_publishedEndpoints.clear();
_locatorInfo = 0;
_reference = 0;
_objectAdapterFactory = 0;
_locatorInfo = nullptr;
_reference = nullptr;
_objectAdapterFactory = nullptr;

_state = StateDestroyed;
_conditionVariable.notify_all();
Expand Down Expand Up @@ -582,7 +582,6 @@ optional<LocatorPrx>
Ice::ObjectAdapterI::getLocator() const noexcept
{
lock_guard lock(_mutex);
checkForDeactivation();
return _locatorInfo ? optional<LocatorPrx>(_locatorInfo->getLocator()) : nullopt;
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/Properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ Ice::Properties::parseOptions(string_view prefix, const StringSeq& options)
}
else
{
unmatched.emplace_back(opt);
unmatched.push_back(std::move(opt));
}
}

Expand Down
80 changes: 40 additions & 40 deletions cpp/src/Ice/PropertyNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const PropertyArray PropertyNames::ProxyProps
{
.name="Proxy",
.prefixOnly=false,
.isOptIn=false,
.properties=ProxyPropsData,
.length=9,
.isOptIn=false
.length=9
};

const Property ConnectionPropsData[] =
Expand All @@ -45,9 +45,9 @@ const PropertyArray PropertyNames::ConnectionProps
{
.name="Connection",
.prefixOnly=true,
.isOptIn=false,
.properties=ConnectionPropsData,
.length=6,
.isOptIn=false
.length=6
};

const Property ThreadPoolPropsData[] =
Expand All @@ -63,9 +63,9 @@ const PropertyArray PropertyNames::ThreadPoolProps
{
.name="ThreadPool",
.prefixOnly=true,
.isOptIn=false,
.properties=ThreadPoolPropsData,
.length=5,
.isOptIn=false
.length=5
};

const Property ObjectAdapterPropsData[] =
Expand All @@ -88,9 +88,9 @@ const PropertyArray PropertyNames::ObjectAdapterProps
{
.name="ObjectAdapter",
.prefixOnly=true,
.isOptIn=false,
.properties=ObjectAdapterPropsData,
.length=12,
.isOptIn=false
.length=12
};

const Property LMDBPropsData[] =
Expand All @@ -103,9 +103,9 @@ const PropertyArray PropertyNames::LMDBProps
{
.name="LMDB",
.prefixOnly=true,
.isOptIn=false,
.properties=LMDBPropsData,
.length=2,
.isOptIn=false
.length=2
};

const Property IcePropsData[] =
Expand Down Expand Up @@ -199,9 +199,9 @@ const PropertyArray PropertyNames::IceProps
{
.name="Ice",
.prefixOnly=false,
.isOptIn=false,
.properties=IcePropsData,
.length=83,
.isOptIn=false
.length=83
};

const Property IceMXPropsData[] =
Expand All @@ -218,9 +218,9 @@ const PropertyArray PropertyNames::IceMXProps
{
.name="IceMX",
.prefixOnly=false,
.isOptIn=false,
.properties=IceMXPropsData,
.length=6,
.isOptIn=false
.length=6
};

const Property IceDiscoveryPropsData[] =
Expand All @@ -242,9 +242,9 @@ const PropertyArray PropertyNames::IceDiscoveryProps
{
.name="IceDiscovery",
.prefixOnly=false,
.isOptIn=false,
.properties=IceDiscoveryPropsData,
.length=11,
.isOptIn=false
.length=11
};

const Property IceLocatorDiscoveryPropsData[] =
Expand All @@ -266,9 +266,9 @@ const PropertyArray PropertyNames::IceLocatorDiscoveryProps
{
.name="IceLocatorDiscovery",
.prefixOnly=false,
.isOptIn=false,
.properties=IceLocatorDiscoveryPropsData,
.length=11,
.isOptIn=false
.length=11
};

const Property IceBoxPropsData[] =
Expand All @@ -285,9 +285,9 @@ const PropertyArray PropertyNames::IceBoxProps
{
.name="IceBox",
.prefixOnly=false,
.isOptIn=true,
.properties=IceBoxPropsData,
.length=6,
.isOptIn=true
.length=6
};

const Property IceBoxAdminPropsData[] =
Expand All @@ -299,9 +299,9 @@ const PropertyArray PropertyNames::IceBoxAdminProps
{
.name="IceBoxAdmin",
.prefixOnly=false,
.isOptIn=true,
.properties=IceBoxAdminPropsData,
.length=1,
.isOptIn=true
.length=1
};

const Property IceBridgePropsData[] =
Expand All @@ -315,9 +315,9 @@ const PropertyArray PropertyNames::IceBridgeProps
{
.name="IceBridge",
.prefixOnly=false,
.isOptIn=true,
.properties=IceBridgePropsData,
.length=3,
.isOptIn=true
.length=3
};

const Property IceGridAdminPropsData[] =
Expand All @@ -341,9 +341,9 @@ const PropertyArray PropertyNames::IceGridAdminProps
{
.name="IceGridAdmin",
.prefixOnly=false,
.isOptIn=true,
.properties=IceGridAdminPropsData,
.length=13,
.isOptIn=true
.length=13
};

const Property IceGridPropsData[] =
Expand Down Expand Up @@ -416,9 +416,9 @@ const PropertyArray PropertyNames::IceGridProps
{
.name="IceGrid",
.prefixOnly=false,
.isOptIn=true,
.properties=IceGridPropsData,
.length=62,
.isOptIn=true
.length=62
};

const Property IceSSLPropsData[] =
Expand Down Expand Up @@ -450,9 +450,9 @@ const PropertyArray PropertyNames::IceSSLProps
{
.name="IceSSL",
.prefixOnly=false,
.isOptIn=false,
.properties=IceSSLPropsData,
.length=21,
.isOptIn=false
.length=21
};

const Property IceStormPropsData[] =
Expand Down Expand Up @@ -487,9 +487,9 @@ const PropertyArray PropertyNames::IceStormProps
{
.name="IceStorm",
.prefixOnly=false,
.isOptIn=true,
.properties=IceStormPropsData,
.length=24,
.isOptIn=true
.length=24
};

const Property IceStormAdminPropsData[] =
Expand All @@ -503,9 +503,9 @@ const PropertyArray PropertyNames::IceStormAdminProps
{
.name="IceStormAdmin",
.prefixOnly=false,
.isOptIn=true,
.properties=IceStormAdminPropsData,
.length=3,
.isOptIn=true
.length=3
};

const Property IceBTPropsData[] =
Expand All @@ -518,9 +518,9 @@ const PropertyArray PropertyNames::IceBTProps
{
.name="IceBT",
.prefixOnly=false,
.isOptIn=false,
.properties=IceBTPropsData,
.length=2,
.isOptIn=false
.length=2
};

const Property Glacier2PropsData[] =
Expand Down Expand Up @@ -555,9 +555,9 @@ const PropertyArray PropertyNames::Glacier2Props
{
.name="Glacier2",
.prefixOnly=false,
.isOptIn=true,
.properties=Glacier2PropsData,
.length=24,
.isOptIn=true
.length=24
};

const Property DataStormPropsData[] =
Expand All @@ -581,9 +581,9 @@ const PropertyArray PropertyNames::DataStormProps
{
.name="DataStorm",
.prefixOnly=false,
.isOptIn=true,
.properties=DataStormPropsData,
.length=13,
.isOptIn=true
.length=13
};

const std::array<PropertyArray, 15> PropertyNames::validProps =
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/PropertyNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ namespace IceInternal
{
const char* name;
const bool prefixOnly;
const bool isOptIn;
const Property* properties;
const int length;
const bool isOptIn;
};

class PropertyNames
Expand Down
1 change: 0 additions & 1 deletion cpp/test/IceBox/configuration/config.icebox2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Ice.Admin.Endpoints=default -p 9996 -h 127.0.0.1
Ice.ProgramName=IceBox2

IceBox.InheritProperties=1

TestInheritProperties=1

ServerProp=1
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Ice/Internal/Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Ice.Internal;

internal sealed record class PropertyArray(string name, bool prefixOnly, Property[] properties);
internal sealed record class PropertyArray(string name, bool prefixOnly, bool isOptIn, Property[] properties);

internal sealed record class Property(
string pattern,
Expand Down
Loading

0 comments on commit 0bba38b

Please sign in to comment.