aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AssetService
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Services/AssetService
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs11
-rw-r--r--OpenSim/Services/AssetService/Properties/AssemblyInfo.cs10
-rw-r--r--OpenSim/Services/AssetService/XAssetService.cs10
3 files changed, 17 insertions, 14 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index 0aefa16..5c37c33 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Services.AssetService
95 public virtual AssetBase Get(string id) 95 public virtual AssetBase Get(string id)
96 { 96 {
97// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); 97// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id);
98 98
99 UUID assetID; 99 UUID assetID;
100 100
101 if (!UUID.TryParse(id, out assetID)) 101 if (!UUID.TryParse(id, out assetID))
@@ -166,7 +166,7 @@ namespace OpenSim.Services.AssetService
166 return new bool[ids.Length]; 166 return new bool[ids.Length];
167 } 167 }
168 } 168 }
169 169
170 public virtual string Store(AssetBase asset) 170 public virtual string Store(AssetBase asset)
171 { 171 {
172 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; 172 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0];
@@ -174,12 +174,15 @@ namespace OpenSim.Services.AssetService
174 { 174 {
175// m_log.DebugFormat( 175// m_log.DebugFormat(
176// "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length); 176// "[ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.FullID, asset.Data.Length);
177 m_Database.StoreAsset(asset); 177 if (!m_Database.StoreAsset(asset))
178 {
179 return UUID.Zero.ToString();
180 }
178 } 181 }
179// else 182// else
180// { 183// {
181// m_log.DebugFormat( 184// m_log.DebugFormat(
182// "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length); 185// "[ASSET SERVICE]: Not storing asset {0} {1}, bytes {2} as it already exists", asset.Name, asset.FullID, asset.Data.Length);
183// } 186// }
184 187
185 return asset.ID; 188 return asset.ID;
diff --git a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
index 63654a6..8da7100 100644
--- a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
+++ b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Services.AssetService")] 8[assembly: AssemblyTitle("OpenSim.Services.AssetService")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,9 +25,9 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.3.*")] 32[assembly: AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)]
33 33
diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs
index b1e5184..9490d55 100644
--- a/OpenSim/Services/AssetService/XAssetService.cs
+++ b/OpenSim/Services/AssetService/XAssetService.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Services.AssetService
94 public virtual AssetBase Get(string id) 94 public virtual AssetBase Get(string id)
95 { 95 {
96// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id); 96// m_log.DebugFormat("[ASSET SERVICE]: Get asset for {0}", id);
97 97
98 UUID assetID; 98 UUID assetID;
99 99
100 if (!UUID.TryParse(id, out assetID)) 100 if (!UUID.TryParse(id, out assetID))
@@ -162,7 +162,7 @@ namespace OpenSim.Services.AssetService
162 public virtual bool Get(string id, Object sender, AssetRetrieved handler) 162 public virtual bool Get(string id, Object sender, AssetRetrieved handler)
163 { 163 {
164 //m_log.DebugFormat("[XASSET SERVICE]: Get asset async {0}", id); 164 //m_log.DebugFormat("[XASSET SERVICE]: Get asset async {0}", id);
165 165
166 UUID assetID; 166 UUID assetID;
167 167
168 if (!UUID.TryParse(id, out assetID)) 168 if (!UUID.TryParse(id, out assetID))
@@ -171,7 +171,7 @@ namespace OpenSim.Services.AssetService
171 AssetBase asset = Get(id); 171 AssetBase asset = Get(id);
172 172
173 //m_log.DebugFormat("[XASSET SERVICE]: Got asset {0}", asset); 173 //m_log.DebugFormat("[XASSET SERVICE]: Got asset {0}", asset);
174 174
175 handler(id, sender, asset); 175 handler(id, sender, asset);
176 176
177 return true; 177 return true;
@@ -182,7 +182,7 @@ namespace OpenSim.Services.AssetService
182 UUID[] uuid = Array.ConvertAll(ids, id => UUID.Parse(id)); 182 UUID[] uuid = Array.ConvertAll(ids, id => UUID.Parse(id));
183 return m_Database.AssetsExist(uuid); 183 return m_Database.AssetsExist(uuid);
184 } 184 }
185 185
186 public virtual string Store(AssetBase asset) 186 public virtual string Store(AssetBase asset)
187 { 187 {
188 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0]; 188 bool exists = m_Database.AssetsExist(new[] { asset.FullID })[0];
@@ -222,7 +222,7 @@ namespace OpenSim.Services.AssetService
222 222
223 private void MigrateFromChainedService(AssetBase asset) 223 private void MigrateFromChainedService(AssetBase asset)
224 { 224 {
225 Store(asset); 225 Store(asset);
226 m_ChainedAssetService.Delete(asset.ID); 226 m_ChainedAssetService.Delete(asset.ID);
227 } 227 }
228 } 228 }