aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/PGSQLAssetData.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/PGSQL/PGSQLAssetData.cs
parentFixed: when a user logged-in, sometimes he didn't get notified of the Online ... (diff)
downloadopensim-SC_OLD-93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775.zip
opensim-SC_OLD-93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775.tar.gz
opensim-SC_OLD-93a9ed2a6d5f6005ae213e2e91f1c79e2fd7f775.tar.bz2
opensim-SC_OLD-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/PGSQL/PGSQLAssetData.cs')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLAssetData.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLAssetData.cs b/OpenSim/Data/PGSQL/PGSQLAssetData.cs
index ca18dc9..5d8b0a2 100644
--- a/OpenSim/Data/PGSQL/PGSQLAssetData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLAssetData.cs
@@ -166,18 +166,18 @@ namespace OpenSim.Data.PGSQL
166 "; 166 ";
167 167
168 string assetName = asset.Name; 168 string assetName = asset.Name;
169 if (asset.Name.Length > 64) 169 if (asset.Name.Length > AssetBase.MAX_ASSET_NAME)
170 { 170 {
171 assetName = asset.Name.Substring(0, 64); 171 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME);
172 m_log.WarnFormat( 172 m_log.WarnFormat(
173 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", 173 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
174 asset.Name, asset.ID, asset.Name.Length, assetName.Length); 174 asset.Name, asset.ID, asset.Name.Length, assetName.Length);
175 } 175 }
176 176
177 string assetDescription = asset.Description; 177 string assetDescription = asset.Description;
178 if (asset.Description.Length > 64) 178 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
179 { 179 {
180 assetDescription = asset.Description.Substring(0, 64); 180 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
181 m_log.WarnFormat( 181 m_log.WarnFormat(
182 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", 182 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
183 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); 183 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);