aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorUbitUmarov2016-11-24 14:39:08 +0000
committerUbitUmarov2016-11-24 14:39:08 +0000
commit5202ae7bb4b3e20aad762811195922da6926a54c (patch)
tree8d77ea056dc7e2af1a2bc5e6e44c7ba40eab027f /OpenSim/Data
parent fix llRez(AtRoot/Object) error messages on shared code path (diff)
downloadopensim-SC_OLD-5202ae7bb4b3e20aad762811195922da6926a54c.zip
opensim-SC_OLD-5202ae7bb4b3e20aad762811195922da6926a54c.tar.gz
opensim-SC_OLD-5202ae7bb4b3e20aad762811195922da6926a54c.tar.bz2
opensim-SC_OLD-5202ae7bb4b3e20aad762811195922da6926a54c.tar.xz
revert changes to asset desc size, my bad.. this field will possible go away in future
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs8
-rw-r--r--OpenSim/Data/MySQL/MySQLXAssetData.cs10
-rw-r--r--OpenSim/Data/PGSQL/PGSQLAssetData.cs10
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs10
4 files changed, 15 insertions, 23 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 83e7e4c..1488e1a 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -170,14 +170,6 @@ namespace OpenSim.Data.MySQL
170 } 170 }
171 171
172 string assetDescription = asset.Description; 172 string assetDescription = asset.Description;
173 if(assetDescription.Length > AssetBase.MAX_LMASSET_DESC)
174 {
175 if(asset.Type == (sbyte) AssetType.Landmark)
176 assetDescription = assetDescription.Substring(0, AssetBase.MAX_LMASSET_DESC);
177 else
178 assetDescription = assetDescription.Substring(0, AssetBase.MAX_ASSET_DESC);
179 }
180
181 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC) 173 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
182 { 174 {
183 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC); 175 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs
index 6c6f560..ec2bcc6 100644
--- a/OpenSim/Data/MySQL/MySQLXAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs
@@ -214,12 +214,12 @@ namespace OpenSim.Data.MySQL
214 } 214 }
215 215
216 string assetDescription = asset.Description; 216 string assetDescription = asset.Description;
217 if(assetDescription.Length > AssetBase.MAX_LMASSET_DESC) 217 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
218 { 218 {
219 if(asset.Type == (sbyte) AssetType.Landmark) 219 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
220 assetDescription = assetDescription.Substring(0, AssetBase.MAX_LMASSET_DESC); 220 m_log.WarnFormat(
221 else 221 "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
222 assetDescription = assetDescription.Substring(0, AssetBase.MAX_ASSET_DESC); 222 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
223 } 223 }
224 224
225 if (m_enableCompression) 225 if (m_enableCompression)
diff --git a/OpenSim/Data/PGSQL/PGSQLAssetData.cs b/OpenSim/Data/PGSQL/PGSQLAssetData.cs
index 97ea6a4..81adb03 100644
--- a/OpenSim/Data/PGSQL/PGSQLAssetData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLAssetData.cs
@@ -175,12 +175,12 @@ namespace OpenSim.Data.PGSQL
175 } 175 }
176 176
177 string assetDescription = asset.Description; 177 string assetDescription = asset.Description;
178 if(assetDescription.Length > AssetBase.MAX_LMASSET_DESC) 178 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
179 { 179 {
180 if(asset.Type == (sbyte) AssetType.Landmark) 180 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
181 assetDescription = assetDescription.Substring(0, AssetBase.MAX_LMASSET_DESC); 181 m_log.WarnFormat(
182 else 182 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
183 assetDescription = assetDescription.Substring(0, AssetBase.MAX_ASSET_DESC); 183 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
184 } 184 }
185 185
186 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 186 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 9fbd9c7..9c2bd2e 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -143,12 +143,12 @@ namespace OpenSim.Data.SQLite
143 } 143 }
144 144
145 string assetDescription = asset.Description; 145 string assetDescription = asset.Description;
146 if(assetDescription.Length > AssetBase.MAX_LMASSET_DESC) 146 if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
147 { 147 {
148 if(asset.Type == (sbyte) AssetType.Landmark) 148 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
149 assetDescription = assetDescription.Substring(0, AssetBase.MAX_LMASSET_DESC); 149 m_log.WarnFormat(
150 else 150 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
151 assetDescription = assetDescription.Substring(0, AssetBase.MAX_ASSET_DESC); 151 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
152 } 152 }
153 153
154 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString()); 154 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());