diff options
author | Oren Hurvitz | 2014-04-22 12:04:06 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-04-22 12:18:54 +0300 |
commit | 93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775 (patch) | |
tree | 10f801c88be06ec81cd0b8725947d7729ea39c45 /OpenSim/Data/MySQL/MySQLXAssetData.cs | |
parent | Fixed: when a user logged-in, sometimes he didn't get notified of the Online ... (diff) | |
download | opensim-SC-93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775.zip opensim-SC-93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775.tar.gz opensim-SC-93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775.tar.bz2 opensim-SC-93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775.tar.xz |
Changed the maximum asset name and description lengths to constants. Also, pre-truncate the description of dynamic textures.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLXAssetData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLXAssetData.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs index 1bf6a9a..430bb9f 100644 --- a/OpenSim/Data/MySQL/MySQLXAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs | |||
@@ -210,18 +210,18 @@ namespace OpenSim.Data.MySQL | |||
210 | using (MySqlTransaction transaction = dbcon.BeginTransaction()) | 210 | using (MySqlTransaction transaction = dbcon.BeginTransaction()) |
211 | { | 211 | { |
212 | string assetName = asset.Name; | 212 | string assetName = asset.Name; |
213 | if (asset.Name.Length > 64) | 213 | if (asset.Name.Length > AssetBase.MAX_ASSET_NAME) |
214 | { | 214 | { |
215 | assetName = asset.Name.Substring(0, 64); | 215 | assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME); |
216 | m_log.WarnFormat( | 216 | m_log.WarnFormat( |
217 | "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", | 217 | "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", |
218 | asset.Name, asset.ID, asset.Name.Length, assetName.Length); | 218 | asset.Name, asset.ID, asset.Name.Length, assetName.Length); |
219 | } | 219 | } |
220 | 220 | ||
221 | string assetDescription = asset.Description; | 221 | string assetDescription = asset.Description; |
222 | if (asset.Description.Length > 64) | 222 | if (asset.Description.Length > AssetBase.MAX_ASSET_DESC) |
223 | { | 223 | { |
224 | assetDescription = asset.Description.Substring(0, 64); | 224 | assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC); |
225 | m_log.WarnFormat( | 225 | m_log.WarnFormat( |
226 | "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", | 226 | "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", |
227 | asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); | 227 | asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); |