diff options
author | Melanie Thielker | 2017-01-02 17:47:20 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-02 17:47:20 +0000 |
commit | f03a6bbc616c3c9ce8dadce6059cf7899ef91b9b (patch) | |
tree | 9a1865348dc394b3cadbf0cd0a21adfb2e36ee9c /OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |
parent | Replaced OpenMetaverse libs/xmls with new ones. Also added a file in openmeta... (diff) | |
download | opensim-SC-f03a6bbc616c3c9ce8dadce6059cf7899ef91b9b.zip opensim-SC-f03a6bbc616c3c9ce8dadce6059cf7899ef91b9b.tar.gz opensim-SC-f03a6bbc616c3c9ce8dadce6059cf7899ef91b9b.tar.bz2 opensim-SC-f03a6bbc616c3c9ce8dadce6059cf7899ef91b9b.tar.xz |
Create a generic way for passing constructor args to plugins
The old syntax didn't allow for any parameters except for services
listed in the ServiceList. Now, services loaded by other services can
also be made to use different ini sections or have additional paramters.
Syntax is: [<ExtraParam>@]...<DllName>[:<ClassName>]
Diffstat (limited to 'OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index 2ddd7a2..bd5841b 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |||
@@ -63,6 +63,7 @@ namespace OpenSim.Services.Connectors | |||
63 | /// In this case, -1 is default timeout (100 seconds), not infinite. | 63 | /// In this case, -1 is default timeout (100 seconds), not infinite. |
64 | /// </remarks> | 64 | /// </remarks> |
65 | private int m_requestTimeoutSecs = -1; | 65 | private int m_requestTimeoutSecs = -1; |
66 | private string m_configName = "InventoryService"; | ||
66 | 67 | ||
67 | private const double CACHE_EXPIRATION_SECONDS = 20.0; | 68 | private const double CACHE_EXPIRATION_SECONDS = 20.0; |
68 | private static ExpiringCache<UUID, InventoryItemBase> m_ItemCache = new ExpiringCache<UUID,InventoryItemBase>(); | 69 | private static ExpiringCache<UUID, InventoryItemBase> m_ItemCache = new ExpiringCache<UUID,InventoryItemBase>(); |
@@ -76,6 +77,13 @@ namespace OpenSim.Services.Connectors | |||
76 | m_ServerURI = serverURI.TrimEnd('/'); | 77 | m_ServerURI = serverURI.TrimEnd('/'); |
77 | } | 78 | } |
78 | 79 | ||
80 | public XInventoryServicesConnector(IConfigSource source, string configName) | ||
81 | : base(source, configName) | ||
82 | { | ||
83 | m_configName = configName; | ||
84 | Initialise(source); | ||
85 | } | ||
86 | |||
79 | public XInventoryServicesConnector(IConfigSource source) | 87 | public XInventoryServicesConnector(IConfigSource source) |
80 | : base(source, "InventoryService") | 88 | : base(source, "InventoryService") |
81 | { | 89 | { |
@@ -84,10 +92,10 @@ namespace OpenSim.Services.Connectors | |||
84 | 92 | ||
85 | public virtual void Initialise(IConfigSource source) | 93 | public virtual void Initialise(IConfigSource source) |
86 | { | 94 | { |
87 | IConfig config = source.Configs["InventoryService"]; | 95 | IConfig config = source.Configs[m_configName]; |
88 | if (config == null) | 96 | if (config == null) |
89 | { | 97 | { |
90 | m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); | 98 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: {0} missing from OpenSim.ini", m_configName); |
91 | throw new Exception("Inventory connector init error"); | 99 | throw new Exception("Inventory connector init error"); |
92 | } | 100 | } |
93 | 101 | ||