diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Data/SQLite/SQLiteAssetData.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteAssetData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 30b26c4..966d0b8 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Data.SQLite | |||
86 | 86 | ||
87 | if (dbconnect == string.Empty) | 87 | if (dbconnect == string.Empty) |
88 | { | 88 | { |
89 | dbconnect = "URI=file:../db/Asset.db,version=3"; | 89 | dbconnect = "URI=file:Asset.db,version=3"; |
90 | } | 90 | } |
91 | m_conn = new SqliteConnection(dbconnect); | 91 | m_conn = new SqliteConnection(dbconnect); |
92 | m_conn.Open(); | 92 | m_conn.Open(); |
@@ -131,14 +131,14 @@ namespace OpenSim.Data.SQLite | |||
131 | /// Create an asset | 131 | /// Create an asset |
132 | /// </summary> | 132 | /// </summary> |
133 | /// <param name="asset">Asset Base</param> | 133 | /// <param name="asset">Asset Base</param> |
134 | override public void StoreAsset(AssetBase asset) | 134 | override public bool StoreAsset(AssetBase asset) |
135 | { | 135 | { |
136 | string assetName = asset.Name; | 136 | string assetName = asset.Name; |
137 | if (asset.Name.Length > AssetBase.MAX_ASSET_NAME) | 137 | if (asset.Name.Length > AssetBase.MAX_ASSET_NAME) |
138 | { | 138 | { |
139 | assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME); | 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 | ||
@@ -147,7 +147,7 @@ namespace OpenSim.Data.SQLite | |||
147 | { | 147 | { |
148 | assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC); | 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); |
152 | } | 152 | } |
153 | 153 | ||
@@ -171,6 +171,7 @@ namespace OpenSim.Data.SQLite | |||
171 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 171 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
172 | 172 | ||
173 | cmd.ExecuteNonQuery(); | 173 | cmd.ExecuteNonQuery(); |
174 | return true; | ||
174 | } | 175 | } |
175 | } | 176 | } |
176 | } | 177 | } |
@@ -191,6 +192,7 @@ namespace OpenSim.Data.SQLite | |||
191 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 192 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
192 | 193 | ||
193 | cmd.ExecuteNonQuery(); | 194 | cmd.ExecuteNonQuery(); |
195 | return true; | ||
194 | } | 196 | } |
195 | } | 197 | } |
196 | } | 198 | } |
@@ -358,7 +360,7 @@ namespace OpenSim.Data.SQLite | |||
358 | /// </summary> | 360 | /// </summary> |
359 | override public void Initialise() | 361 | override public void Initialise() |
360 | { | 362 | { |
361 | Initialise("URI=file:../db/Asset.db,version=3"); | 363 | Initialise("URI=file:Asset.db,version=3"); |
362 | } | 364 | } |
363 | 365 | ||
364 | /// <summary> | 366 | /// <summary> |