aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent
diff options
context:
space:
mode:
authorMike Mazur2009-02-17 01:36:44 +0000
committerMike Mazur2009-02-17 01:36:44 +0000
commit76c0935ec744f2d230489398f879eb7f42b11d37 (patch)
treea68253554e3899f10b6c341db369ce4a029dfaa5 /OpenSim/Region/CoreModules/Agent
parentMajor change to how appearance is managed, including changes in login and use... (diff)
downloadopensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.zip
opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.gz
opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.bz2
opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.xz
- remove the Metadata property from AssetBase and return all previous
properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent')
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs20
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs26
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/TextureSender.cs12
3 files changed, 29 insertions, 29 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index 0bf91e0..eefcfe8 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -172,10 +172,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
172 "[ASSET TRANSACTIONS]: Updating task item {0} in {1} with asset in transaction {2}", 172 "[ASSET TRANSACTIONS]: Updating task item {0} in {1} with asset in transaction {2}",
173 item.Name, part.Name, transactionID); 173 item.Name, part.Name, transactionID);
174 174
175 asset.Metadata.Name = item.Name; 175 asset.Name = item.Name;
176 asset.Metadata.Description = item.Description; 176 asset.Description = item.Description;
177 asset.Metadata.Type = (sbyte)item.Type; 177 asset.Type = (sbyte)item.Type;
178 item.AssetID = asset.Metadata.FullID; 178 item.AssetID = asset.FullID;
179 179
180 Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); 180 Manager.MyScene.CommsManager.AssetCache.AddAsset(asset);
181 181
@@ -207,14 +207,14 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
207 asset = GetTransactionAsset(transactionID); 207 asset = GetTransactionAsset(transactionID);
208 } 208 }
209 209
210 if (asset != null && asset.Metadata.FullID == assetID) 210 if (asset != null && asset.FullID == assetID)
211 { 211 {
212 // Assets never get updated, new ones get created 212 // Assets never get updated, new ones get created
213 asset.Metadata.FullID = UUID.Random(); 213 asset.FullID = UUID.Random();
214 asset.Metadata.Name = item.Name; 214 asset.Name = item.Name;
215 asset.Metadata.Description = item.Description; 215 asset.Description = item.Description;
216 asset.Metadata.Type = (sbyte)item.AssetType; 216 asset.Type = (sbyte)item.AssetType;
217 item.AssetID = asset.Metadata.FullID; 217 item.AssetID = asset.FullID;
218 218
219 Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); 219 Manager.MyScene.CommsManager.AssetCache.AddAsset(asset);
220 } 220 }
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index 9af764f..b71c2a6 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -111,13 +111,13 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
111 { 111 {
112 ourClient = remoteClient; 112 ourClient = remoteClient;
113 m_asset = new AssetBase(); 113 m_asset = new AssetBase();
114 m_asset.Metadata.FullID = assetID; 114 m_asset.FullID = assetID;
115 m_asset.Metadata.Type = type; 115 m_asset.Type = type;
116 m_asset.Data = data; 116 m_asset.Data = data;
117 m_asset.Metadata.Name = "blank"; 117 m_asset.Name = "blank";
118 m_asset.Metadata.Description = "empty"; 118 m_asset.Description = "empty";
119 m_asset.Metadata.Local = storeLocal; 119 m_asset.Local = storeLocal;
120 m_asset.Metadata.Temporary = tempFile; 120 m_asset.Temporary = tempFile;
121 121
122 TransactionID = transaction; 122 TransactionID = transaction;
123 m_storeLocal = storeLocal; 123 m_storeLocal = storeLocal;
@@ -138,12 +138,12 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
138 protected void RequestStartXfer() 138 protected void RequestStartXfer()
139 { 139 {
140 XferID = Util.GetNextXferID(); 140 XferID = Util.GetNextXferID();
141 ourClient.SendXferRequest(XferID, m_asset.Metadata.Type, m_asset.Metadata.FullID, 0, new byte[0]); 141 ourClient.SendXferRequest(XferID, m_asset.Type, m_asset.FullID, 0, new byte[0]);
142 } 142 }
143 143
144 protected void SendCompleteMessage() 144 protected void SendCompleteMessage()
145 { 145 {
146 ourClient.SendAssetUploadCompleteMessage(m_asset.Metadata.Type, true, m_asset.Metadata.FullID); 146 ourClient.SendAssetUploadCompleteMessage(m_asset.Type, true, m_asset.FullID);
147 147
148 m_finished = true; 148 m_finished = true;
149 if (m_createItem) 149 if (m_createItem)
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
162 DateTime now = DateTime.Now; 162 DateTime now = DateTime.Now;
163 string filename = 163 string filename =
164 String.Format("{6}_{7}_{0:d2}{1:d2}{2:d2}_{3:d2}{4:d2}{5:d2}.dat", now.Year, now.Month, now.Day, 164 String.Format("{6}_{7}_{0:d2}{1:d2}{2:d2}_{3:d2}{4:d2}{5:d2}.dat", now.Year, now.Month, now.Day,
165 now.Hour, now.Minute, now.Second, m_asset.Metadata.Name, m_asset.Metadata.Type); 165 now.Hour, now.Minute, now.Second, m_asset.Name, m_asset.Type);
166 SaveAssetToFile(filename, m_asset.Data); 166 SaveAssetToFile(filename, m_asset.Data);
167 } 167 }
168 } 168 }
@@ -194,9 +194,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
194 this.invType = invType; 194 this.invType = invType;
195 this.wearableType = wearableType; 195 this.wearableType = wearableType;
196 nextPerm = nextOwnerMask; 196 nextPerm = nextOwnerMask;
197 m_asset.Metadata.Name = name; 197 m_asset.Name = name;
198 m_asset.Metadata.Description = description; 198 m_asset.Description = description;
199 m_asset.Metadata.Type = type; 199 m_asset.Type = type;
200 200
201 if (m_finished) 201 if (m_finished)
202 { 202 {
@@ -223,7 +223,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
223 item.Owner = ourClient.AgentId; 223 item.Owner = ourClient.AgentId;
224 item.Creator = ourClient.AgentId; 224 item.Creator = ourClient.AgentId;
225 item.ID = UUID.Random(); 225 item.ID = UUID.Random();
226 item.AssetID = m_asset.Metadata.FullID; 226 item.AssetID = m_asset.FullID;
227 item.Description = m_description; 227 item.Description = m_description;
228 item.Name = m_name; 228 item.Name = m_name;
229 item.AssetType = type; 229 item.AssetType = type;
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/TextureSender.cs
index dde8566..e02ea6d 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/TextureSender.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/TextureSender.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
54 /// </summary> 54 /// </summary>
55 private AssetBase m_asset; 55 private AssetBase m_asset;
56 56
57 //public UUID assetID { get { return m_asset.Metadata.FullID; } } 57 //public UUID assetID { get { return m_asset.FullID; } }
58 58
59 // private bool m_cancel = false; 59 // private bool m_cancel = false;
60 60
@@ -116,7 +116,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
116 // See ITextureSender 116 // See ITextureSender
117 public bool SendTexturePacket() 117 public bool SendTexturePacket()
118 { 118 {
119 //m_log.DebugFormat("[TEXTURE SENDER]: Sending packet for {0}", m_asset.Metadata.FullID); 119 //m_log.DebugFormat("[TEXTURE SENDER]: Sending packet for {0}", m_asset.FullID);
120 120
121 SendPacket(); 121 SendPacket();
122 counter++; 122 counter++;
@@ -153,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
153 { 153 {
154 if (NumPackets == 0) 154 if (NumPackets == 0)
155 { 155 {
156 RequestUser.SendImageFirstPart(1, m_asset.Metadata.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2); 156 RequestUser.SendImageFirstPart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2);
157 PacketCounter++; 157 PacketCounter++;
158 } 158 }
159 else 159 else
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
162 Array.Copy(m_asset.Data, 0, ImageData1, 0, 600); 162 Array.Copy(m_asset.Data, 0, ImageData1, 0, 600);
163 163
164 RequestUser.SendImageFirstPart( 164 RequestUser.SendImageFirstPart(
165 (ushort)(NumPackets), m_asset.Metadata.FullID, (uint)m_asset.Data.Length, ImageData1, 2); 165 (ushort)(NumPackets), m_asset.FullID, (uint)m_asset.Data.Length, ImageData1, 2);
166 PacketCounter++; 166 PacketCounter++;
167 } 167 }
168 } 168 }
@@ -178,11 +178,11 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
178 catch (ArgumentOutOfRangeException) 178 catch (ArgumentOutOfRangeException)
179 { 179 {
180 m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + 180 m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" +
181 m_asset.Metadata.ID); 181 m_asset.ID);
182 return; 182 return;
183 } 183 }
184 184
185 RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.Metadata.FullID, imageData); 185 RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.FullID, imageData);
186 PacketCounter++; 186 PacketCounter++;
187 } 187 }
188 } 188 }