diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLXInventoryData.cs | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index fe5152a..f9ce3d9 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -153,7 +153,7 @@ namespace OpenSim.Data.MySQL | |||
153 | /// </summary> | 153 | /// </summary> |
154 | /// <param name="asset">Asset UUID to create</param> | 154 | /// <param name="asset">Asset UUID to create</param> |
155 | /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks> | 155 | /// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks> |
156 | override public void StoreAsset(AssetBase asset) | 156 | override public bool StoreAsset(AssetBase asset) |
157 | { | 157 | { |
158 | lock (m_dbLock) | 158 | lock (m_dbLock) |
159 | { | 159 | { |
@@ -201,12 +201,14 @@ namespace OpenSim.Data.MySQL | |||
201 | cmd.Parameters.AddWithValue("?data", asset.Data); | 201 | cmd.Parameters.AddWithValue("?data", asset.Data); |
202 | cmd.ExecuteNonQuery(); | 202 | cmd.ExecuteNonQuery(); |
203 | cmd.Dispose(); | 203 | cmd.Dispose(); |
204 | return true; | ||
204 | } | 205 | } |
205 | } | 206 | } |
206 | catch (Exception e) | 207 | catch (Exception e) |
207 | { | 208 | { |
208 | m_log.ErrorFormat("[ASSET DB]: MySQL failure creating asset {0} with name \"{1}\". Error: {2}", | 209 | m_log.ErrorFormat("[ASSET DB]: MySQL failure creating asset {0} with name \"{1}\". Error: {2}", |
209 | asset.FullID, asset.Name, e.Message); | 210 | asset.FullID, asset.Name, e.Message); |
211 | return false; | ||
210 | } | 212 | } |
211 | } | 213 | } |
212 | } | 214 | } |
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 0fe801d..3c73095 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs | |||
@@ -64,14 +64,22 @@ namespace OpenSim.Data.MySQL | |||
64 | 64 | ||
65 | public bool StoreFolder(XInventoryFolder folder) | 65 | public bool StoreFolder(XInventoryFolder folder) |
66 | { | 66 | { |
67 | if (folder.folderName.Length > 64) | ||
68 | folder.folderName = folder.folderName.Substring(0, 64); | ||
69 | |||
67 | return m_Folders.Store(folder); | 70 | return m_Folders.Store(folder); |
68 | } | 71 | } |
69 | 72 | ||
70 | public bool StoreItem(XInventoryItem item) | 73 | public bool StoreItem(XInventoryItem item) |
71 | { | 74 | { |
75 | if (item.inventoryName.Length > 64) | ||
76 | item.inventoryName = item.inventoryName.Substring(0, 64); | ||
77 | if (item.inventoryDescription.Length > 128) | ||
78 | item.inventoryDescription = item.inventoryDescription.Substring(0, 128); | ||
79 | |||
72 | return m_Items.Store(item); | 80 | return m_Items.Store(item); |
73 | } | 81 | } |
74 | 82 | ||
75 | public bool DeleteFolders(string field, string val) | 83 | public bool DeleteFolders(string field, string val) |
76 | { | 84 | { |
77 | return m_Folders.Delete(field, val); | 85 | return m_Folders.Delete(field, val); |