diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 17 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGridData.cs | 13 |
2 files changed, 5 insertions, 25 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 0865083..66c34fe 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -135,7 +135,7 @@ namespace OpenSim.Data.MySQL | |||
135 | /// <param name="assetID">Asset UUID to fetch</param> | 135 | /// <param name="assetID">Asset UUID to fetch</param> |
136 | /// <returns>Return the asset</returns> | 136 | /// <returns>Return the asset</returns> |
137 | /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks> | 137 | /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks> |
138 | override protected AssetBase FetchStoredAsset(UUID assetID) | 138 | override public AssetBase GetAsset(UUID assetID) |
139 | { | 139 | { |
140 | AssetBase asset = null; | 140 | AssetBase asset = null; |
141 | lock (_dbConnection) | 141 | lock (_dbConnection) |
@@ -168,7 +168,7 @@ namespace OpenSim.Data.MySQL | |||
168 | } | 168 | } |
169 | asset.Name = (string) dbReader["name"]; | 169 | asset.Name = (string) dbReader["name"]; |
170 | asset.Type = (sbyte) dbReader["assetType"]; | 170 | asset.Type = (sbyte) dbReader["assetType"]; |
171 | asset.Temporary = (bool)dbReader["temporary"]; | 171 | asset.Temporary = Convert.ToBoolean(dbReader["temporary"]); |
172 | } | 172 | } |
173 | dbReader.Close(); | 173 | dbReader.Close(); |
174 | cmd.Dispose(); | 174 | cmd.Dispose(); |
@@ -192,7 +192,7 @@ namespace OpenSim.Data.MySQL | |||
192 | /// </summary> | 192 | /// </summary> |
193 | /// <param name="asset">Asset UUID to create</param> | 193 | /// <param name="asset">Asset UUID to create</param> |
194 | /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks> | 194 | /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks> |
195 | override public void CreateAsset(AssetBase asset) | 195 | override public void StoreAsset(AssetBase asset) |
196 | { | 196 | { |
197 | lock (_dbConnection) | 197 | lock (_dbConnection) |
198 | { | 198 | { |
@@ -285,15 +285,6 @@ namespace OpenSim.Data.MySQL | |||
285 | } | 285 | } |
286 | 286 | ||
287 | /// <summary> | 287 | /// <summary> |
288 | /// Update a asset in database, see <see cref="CreateAsset"/> | ||
289 | /// </summary> | ||
290 | /// <param name="asset">Asset UUID to update</param> | ||
291 | override public void UpdateAsset(AssetBase asset) | ||
292 | { | ||
293 | CreateAsset(asset); | ||
294 | } | ||
295 | |||
296 | /// <summary> | ||
297 | /// check if the asset UUID exist in database | 288 | /// check if the asset UUID exist in database |
298 | /// </summary> | 289 | /// </summary> |
299 | /// <param name="uuid">The asset UUID</param> | 290 | /// <param name="uuid">The asset UUID</param> |
@@ -368,7 +359,7 @@ namespace OpenSim.Data.MySQL | |||
368 | metadata.Name = (string) dbReader["name"]; | 359 | metadata.Name = (string) dbReader["name"]; |
369 | metadata.Description = (string) dbReader["description"]; | 360 | metadata.Description = (string) dbReader["description"]; |
370 | metadata.Type = (sbyte) dbReader["assetType"]; | 361 | metadata.Type = (sbyte) dbReader["assetType"]; |
371 | metadata.Temporary = (bool) dbReader["temporary"]; // Not sure if this is correct. | 362 | metadata.Temporary = Convert.ToBoolean(dbReader["temporary"]); // Not sure if this is correct. |
372 | metadata.FullID = new UUID((string) dbReader["id"]); | 363 | metadata.FullID = new UUID((string) dbReader["id"]); |
373 | 364 | ||
374 | // Current SHA1s are not stored/computed. | 365 | // Current SHA1s are not stored/computed. |
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs index 0a5800b..1ec2609 100644 --- a/OpenSim/Data/MySQL/MySQLGridData.cs +++ b/OpenSim/Data/MySQL/MySQLGridData.cs | |||
@@ -391,7 +391,7 @@ namespace OpenSim.Data.MySQL | |||
391 | /// </summary> | 391 | /// </summary> |
392 | /// <param name="profile">The profile to add</param> | 392 | /// <param name="profile">The profile to add</param> |
393 | /// <returns>Successful?</returns> | 393 | /// <returns>Successful?</returns> |
394 | override public DataResponse AddProfile(RegionProfileData profile) | 394 | override public DataResponse StoreProfile(RegionProfileData profile) |
395 | { | 395 | { |
396 | MySQLSuperManager dbm = GetLockedConnection(); | 396 | MySQLSuperManager dbm = GetLockedConnection(); |
397 | try { | 397 | try { |
@@ -408,17 +408,6 @@ namespace OpenSim.Data.MySQL | |||
408 | } | 408 | } |
409 | 409 | ||
410 | /// <summary> | 410 | /// <summary> |
411 | /// Update a sim profile | ||
412 | /// </summary> | ||
413 | /// <param name="profile">The profile to update</param> | ||
414 | /// <returns>Sucessful?</returns> | ||
415 | /// <remarks>Same as AddProfile</remarks> | ||
416 | override public DataResponse UpdateProfile(RegionProfileData profile) | ||
417 | { | ||
418 | return AddProfile(profile); | ||
419 | } | ||
420 | |||
421 | /// <summary> | ||
422 | /// Deletes a sim profile from the database | 411 | /// Deletes a sim profile from the database |
423 | /// </summary> | 412 | /// </summary> |
424 | /// <param name="uuid">the sim UUID</param> | 413 | /// <param name="uuid">the sim UUID</param> |