diff options
author | Melanie | 2012-03-09 02:39:14 +0000 |
---|---|---|
committer | Melanie | 2012-03-09 02:39:14 +0000 |
commit | dc5f831ca8bcaed77b65934a1c6d70c315a3834a (patch) | |
tree | 5f45c7e163096ef23f5139b9ddd3566a3621cd03 /OpenSim/Services/Connectors/Asset | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Simplify minimap coarse location code by just reference SP.AbsolutePosition (diff) | |
download | opensim-SC-dc5f831ca8bcaed77b65934a1c6d70c315a3834a.zip opensim-SC-dc5f831ca8bcaed77b65934a1c6d70c315a3834a.tar.gz opensim-SC-dc5f831ca8bcaed77b65934a1c6d70c315a3834a.tar.bz2 opensim-SC-dc5f831ca8bcaed77b65934a1c6d70c315a3834a.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/ScenePresence.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Services/Connectors/Asset')
-rw-r--r-- | OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs index bb5d51f..c395178 100644 --- a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs | |||
@@ -45,6 +45,24 @@ namespace OpenSim.Services.Connectors | |||
45 | LogManager.GetLogger( | 45 | LogManager.GetLogger( |
46 | MethodBase.GetCurrentMethod().DeclaringType); | 46 | MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | private Dictionary<IAssetService, object> m_endpointSerializer = new Dictionary<IAssetService, object>(); | ||
49 | private object EndPointLock(IAssetService connector) | ||
50 | { | ||
51 | lock (m_endpointSerializer) | ||
52 | { | ||
53 | object eplock = null; | ||
54 | |||
55 | if (! m_endpointSerializer.TryGetValue(connector, out eplock)) | ||
56 | { | ||
57 | eplock = new object(); | ||
58 | m_endpointSerializer.Add(connector, eplock); | ||
59 | // m_log.WarnFormat("[WEB UTIL] add a new host to end point serializer {0}",endpoint); | ||
60 | } | ||
61 | |||
62 | return eplock; | ||
63 | } | ||
64 | } | ||
65 | |||
48 | private Dictionary<string, IAssetService> m_connectors = new Dictionary<string, IAssetService>(); | 66 | private Dictionary<string, IAssetService> m_connectors = new Dictionary<string, IAssetService>(); |
49 | 67 | ||
50 | public HGAssetServiceConnector(IConfigSource source) | 68 | public HGAssetServiceConnector(IConfigSource source) |
@@ -197,7 +215,8 @@ namespace OpenSim.Services.Connectors | |||
197 | IAssetService connector = GetConnector(url); | 215 | IAssetService connector = GetConnector(url); |
198 | // Restore the assetID to a simple UUID | 216 | // Restore the assetID to a simple UUID |
199 | asset.ID = assetID; | 217 | asset.ID = assetID; |
200 | return connector.Store(asset); | 218 | lock (EndPointLock(connector)) |
219 | return connector.Store(asset); | ||
201 | } | 220 | } |
202 | 221 | ||
203 | return String.Empty; | 222 | return String.Empty; |