aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-03-09 03:00:31 +0000
committerUbitUmarov2012-03-09 03:00:31 +0000
commitfc4dc7708dc07dc41791de64d7a6b2586d3170b5 (patch)
tree2b807fd97cdef06e671b52f3e735b849b05f9cfc /OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
parent more changes on undo/redo group scaling seems to work better (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.zip
opensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.tar.gz
opensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.tar.bz2
opensim-SC-fc4dc7708dc07dc41791de64d7a6b2586d3170b5.tar.xz
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs21
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;