aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLAssetData.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index 3eaae12..425e233 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -132,12 +132,12 @@ namespace OpenSim.Data.MSSQL
132 { 132 {
133 AssetBase asset = new AssetBase(); 133 AssetBase asset = new AssetBase();
134 // Region Main 134 // Region Main
135 asset.FullID = new UUID((string)reader["id"]); 135 asset.Metadata.FullID = new UUID((string)reader["id"]);
136 asset.Name = (string)reader["name"]; 136 asset.Metadata.Name = (string)reader["name"];
137 asset.Description = (string)reader["description"]; 137 asset.Metadata.Description = (string)reader["description"];
138 asset.Type = Convert.ToSByte(reader["assetType"]); 138 asset.Metadata.Type = Convert.ToSByte(reader["assetType"]);
139 asset.Local = Convert.ToBoolean(reader["local"]); 139 asset.Metadata.Local = Convert.ToBoolean(reader["local"]);
140 asset.Temporary = Convert.ToBoolean(reader["temporary"]); 140 asset.Metadata.Temporary = Convert.ToBoolean(reader["temporary"]);
141 asset.Data = (byte[])reader["data"]; 141 asset.Data = (byte[])reader["data"];
142 return asset; 142 return asset;
143 } 143 }
@@ -152,7 +152,7 @@ namespace OpenSim.Data.MSSQL
152 /// <param name="asset">the asset</param> 152 /// <param name="asset">the asset</param>
153 override public void CreateAsset(AssetBase asset) 153 override public void CreateAsset(AssetBase asset)
154 { 154 {
155 if (ExistsAsset(asset.FullID)) 155 if (ExistsAsset(asset.Metadata.FullID))
156 { 156 {
157 return; 157 return;
158 } 158 }
@@ -163,12 +163,12 @@ namespace OpenSim.Data.MSSQL
163 "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)")) 163 "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)"))
164 { 164 {
165 int now = (int)((System.DateTime.Now.Ticks - TicksToEpoch) / 10000000); 165 int now = (int)((System.DateTime.Now.Ticks - TicksToEpoch) / 10000000);
166 command.Parameters.Add(database.CreateParameter("id", asset.FullID)); 166 command.Parameters.Add(database.CreateParameter("id", asset.Metadata.FullID));
167 command.Parameters.Add(database.CreateParameter("name", asset.Name)); 167 command.Parameters.Add(database.CreateParameter("name", asset.Metadata.Name));
168 command.Parameters.Add(database.CreateParameter("description", asset.Description)); 168 command.Parameters.Add(database.CreateParameter("description", asset.Metadata.Description));
169 command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); 169 command.Parameters.Add(database.CreateParameter("assetType", asset.Metadata.Type));
170 command.Parameters.Add(database.CreateParameter("local", asset.Local)); 170 command.Parameters.Add(database.CreateParameter("local", asset.Metadata.Local));
171 command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); 171 command.Parameters.Add(database.CreateParameter("temporary", asset.Metadata.Temporary));
172 command.Parameters.Add(database.CreateParameter("access_time", now)); 172 command.Parameters.Add(database.CreateParameter("access_time", now));
173 command.Parameters.Add(database.CreateParameter("create_time", now)); 173 command.Parameters.Add(database.CreateParameter("create_time", now));
174 command.Parameters.Add(database.CreateParameter("data", asset.Data)); 174 command.Parameters.Add(database.CreateParameter("data", asset.Data));
@@ -192,14 +192,14 @@ namespace OpenSim.Data.MSSQL
192 "data = @data where " + 192 "data = @data where " +
193 "id = @keyId;")) 193 "id = @keyId;"))
194 { 194 {
195 command.Parameters.Add(database.CreateParameter("id", asset.FullID)); 195 command.Parameters.Add(database.CreateParameter("id", asset.Metadata.FullID));
196 command.Parameters.Add(database.CreateParameter("name", asset.Name)); 196 command.Parameters.Add(database.CreateParameter("name", asset.Metadata.Name));
197 command.Parameters.Add(database.CreateParameter("description", asset.Description)); 197 command.Parameters.Add(database.CreateParameter("description", asset.Metadata.Description));
198 command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); 198 command.Parameters.Add(database.CreateParameter("assetType", asset.Metadata.Type));
199 command.Parameters.Add(database.CreateParameter("local", asset.Local)); 199 command.Parameters.Add(database.CreateParameter("local", asset.Metadata.Local));
200 command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); 200 command.Parameters.Add(database.CreateParameter("temporary", asset.Metadata.Temporary));
201 command.Parameters.Add(database.CreateParameter("data", asset.Data)); 201 command.Parameters.Add(database.CreateParameter("data", asset.Data));
202 command.Parameters.Add(database.CreateParameter("@keyId", asset.FullID)); 202 command.Parameters.Add(database.CreateParameter("@keyId", asset.Metadata.FullID));
203 203
204 try 204 try
205 { 205 {