aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
authorOren Hurvitz2014-04-22 12:04:06 +0300
committerOren Hurvitz2014-04-22 12:18:54 +0300
commit93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775 (patch)
tree10f801c88be06ec81cd0b8725947d7729ea39c45 /OpenSim/Data/SQLite/SQLiteAssetData.cs
parentFixed: when a user logged-in, sometimes he didn't get notified of the Online ... (diff)
downloadopensim-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/SQLite/SQLiteAssetData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 2834bcf..f0dda64 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -134,18 +134,18 @@ namespace OpenSim.Data.SQLite
134 override public void StoreAsset(AssetBase asset) 134 override public void StoreAsset(AssetBase asset)
135 { 135 {
136 string assetName = asset.Name; 136 string assetName = asset.Name;
137 if (asset.Name.Length > 64) 137 if (asset.Name.Length > AssetBase.MAX_ASSET_NAME)
138 { 138 {
139 assetName = asset.Name.Substring(0, 64); 139 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME);
140 m_log.WarnFormat( 140 m_log.WarnFormat(
141 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", 141 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
142 asset.Name, asset.ID, asset.Name.Length, assetName.Length); 142 asset.Name, asset.ID, asset.Name.Length, assetName.Length);
143 } 143 }
144 144
145 string assetDescription = asset.Description; 145 string assetDescription = asset.Description;
146 if (asset.Description.Length > 64) 146 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
147 { 147 {
148 assetDescription = asset.Description.Substring(0, 64); 148 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
149 m_log.WarnFormat( 149 m_log.WarnFormat(
150 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", 150 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
151 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); 151 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);