aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMichael Heilmann2015-05-19 15:18:45 -0400
committerMichael Heilmann2015-05-19 15:18:45 -0400
commit140ea04b9d692344d803fc87364fb252561725c3 (patch)
treed503b7ae17baca374d704b548fc7da512f512388 /OpenSim/Framework
parentMerge pull request #7 from gamucf/moses.metricsPhase2 (diff)
parentresolve possible nullref when sending appearance packet. Thanks to zadark for... (diff)
downloadopensim-SC_OLD-140ea04b9d692344d803fc87364fb252561725c3.zip
opensim-SC_OLD-140ea04b9d692344d803fc87364fb252561725c3.tar.gz
opensim-SC_OLD-140ea04b9d692344d803fc87364fb252561725c3.tar.bz2
opensim-SC_OLD-140ea04b9d692344d803fc87364fb252561725c3.tar.xz
Merging Opensim upstream before generating patch
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/Communications/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/Console/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/InventoryCollection.cs4
-rw-r--r--OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs184
-rw-r--r--OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/Servers/ServerBase.cs10
12 files changed, 200 insertions, 16 deletions
diff --git a/OpenSim/Framework/AssemblyInfo.cs b/OpenSim/Framework/AssemblyInfo.cs
index 5a15568..a797424 100644
--- a/OpenSim/Framework/AssemblyInfo.cs
+++ b/OpenSim/Framework/AssemblyInfo.cs
@@ -59,4 +59,4 @@ using System.Runtime.InteropServices;
59// Revision 59// Revision
60// 60//
61 61
62[assembly : AssemblyVersion("0.8.1.*")] 62[assembly : AssemblyVersion("0.8.2.*")]
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs
index 26d0351..cd182d6 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.1.*")] 32[assembly: AssemblyVersion("0.8.2.*")]
33 33
diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
index 907cebd..b398167 100644
--- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
@@ -61,5 +61,5 @@ using System.Runtime.InteropServices;
61// You can specify all the values or you can default the Revision and Build Numbers 61// You can specify all the values or you can default the Revision and Build Numbers
62// by using the '*' as shown below: 62// by using the '*' as shown below:
63 63
64[assembly : AssemblyVersion("0.8.1.*")] 64[assembly : AssemblyVersion("0.8.2.*")]
65 65
diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs
index 4e50e44..67af471 100644
--- a/OpenSim/Framework/Console/AssemblyInfo.cs
+++ b/OpenSim/Framework/Console/AssemblyInfo.cs
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
55// You can specify all values by your own or you can build default build and revision 55// You can specify all values by your own or you can build default build and revision
56// numbers with the '*' character (the default): 56// numbers with the '*' character (the default):
57 57
58[assembly : AssemblyVersion("0.8.1.*")] 58[assembly : AssemblyVersion("0.8.2.*")]
diff --git a/OpenSim/Framework/InventoryCollection.cs b/OpenSim/Framework/InventoryCollection.cs
index 7049902..59655eb 100644
--- a/OpenSim/Framework/InventoryCollection.cs
+++ b/OpenSim/Framework/InventoryCollection.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework
37 { 37 {
38 public List<InventoryFolderBase> Folders; 38 public List<InventoryFolderBase> Folders;
39 public List<InventoryItemBase> Items; 39 public List<InventoryItemBase> Items;
40 public UUID UserID; 40 public UUID OwnerID;
41 public UUID FolderID;
42 public int Version;
41 } 43 }
42} 44}
diff --git a/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs b/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs
index ee82753..b08e4f7 100644
--- a/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Monitoring/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.1.*")] 32[assembly: AssemblyVersion("0.8.2.*")]
33 33
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs
index 4341560..3bcbe2f 100644
--- a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.1.*")] 32[assembly: AssemblyVersion("0.8.2.*")]
33 33
diff --git a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs
index e7efdf4..1b2519c 100644
--- a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.1.*")] 32[assembly: AssemblyVersion("0.8.2.*")]
33 33
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
index 6debf65..64de18b 100644
--- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
+++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
@@ -125,7 +125,8 @@ namespace OpenSim.Framework.Serialization.External
125 /// <param name="userService">The service for retrieving user account information</param> 125 /// <param name="userService">The service for retrieving user account information</param>
126 /// <param name="scopeID">The scope of the user account information (Grid ID)</param> 126 /// <param name="scopeID">The scope of the user account information (Grid ID)</param>
127 /// <returns>The SceneObjectPart represented in XML2</returns> 127 /// <returns>The SceneObjectPart represented in XML2</returns>
128 public static string RewriteSOP(string xml, string homeURL, IUserAccountService userService, UUID scopeID) 128 [Obsolete("This method is deprecated. Use RewriteSOP instead.")]
129 public static string RewriteSOP_Old(string xml, string homeURL, IUserAccountService userService, UUID scopeID)
129 { 130 {
130 if (xml == string.Empty || homeURL == string.Empty || userService == null) 131 if (xml == string.Empty || homeURL == string.Empty || userService == null)
131 return xml; 132 return xml;
@@ -173,6 +174,187 @@ namespace OpenSim.Framework.Serialization.External
173 } 174 }
174 } 175 }
175 176
177 /// <summary>
178 /// Takes a XML representation of a SceneObjectPart and returns another XML representation
179 /// with creator data added to it.
180 /// </summary>
181 /// <param name="xml">The SceneObjectPart represented in XML2</param>
182 /// <param name="sceneName">An identifier for the component that's calling this function</param>
183 /// <param name="homeURL">The URL of the user agents service (home) for the creator</param>
184 /// <param name="userService">The service for retrieving user account information</param>
185 /// <param name="scopeID">The scope of the user account information (Grid ID)</param>
186 /// <returns>The SceneObjectPart represented in XML2</returns>
187 public static string RewriteSOP(string xmlData, string sceneName, string homeURL, IUserAccountService userService, UUID scopeID)
188 {
189 // Console.WriteLine("Input XML [{0}]", xmlData);
190 if (xmlData == string.Empty || homeURL == string.Empty || userService == null)
191 return xmlData;
192
193 using (StringWriter sw = new StringWriter())
194 using (XmlTextWriter writer = new XmlTextWriter(sw))
195 using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
196 using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment }))
197 {
198 TransformXml(reader, writer, sceneName, homeURL, userService, scopeID);
199
200 // Console.WriteLine("Output: [{0}]", sw.ToString());
201
202 return sw.ToString();
203 }
204 }
205
206 protected static void TransformXml(XmlReader reader, XmlWriter writer, string sceneName, string homeURI, IUserAccountService userAccountService, UUID scopeID)
207 {
208 // m_log.DebugFormat("[HG ASSET MAPPER]: Transforming XML");
209
210 int sopDepth = -1;
211 UserAccount creator = null;
212 bool hasCreatorData = false;
213
214 while (reader.Read())
215 {
216 // Console.WriteLine("Depth: {0}, name {1}", reader.Depth, reader.Name);
217
218 switch (reader.NodeType)
219 {
220 case XmlNodeType.Attribute:
221 // Console.WriteLine("FOUND ATTRIBUTE {0}", reader.Name);
222 writer.WriteAttributeString(reader.Name, reader.Value);
223 break;
224
225 case XmlNodeType.CDATA:
226 writer.WriteCData(reader.Value);
227 break;
228
229 case XmlNodeType.Comment:
230 writer.WriteComment(reader.Value);
231 break;
232
233 case XmlNodeType.DocumentType:
234 writer.WriteDocType(reader.Name, reader.Value, null, null);
235 break;
236
237 case XmlNodeType.Element:
238 // m_log.DebugFormat("Depth {0} at element {1}", reader.Depth, reader.Name);
239
240 writer.WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
241
242 if (reader.HasAttributes)
243 {
244 while (reader.MoveToNextAttribute())
245 writer.WriteAttributeString(reader.Name, reader.Value);
246
247 reader.MoveToElement();
248 }
249
250 if (reader.LocalName == "SceneObjectPart")
251 {
252 if (sopDepth < 0)
253 {
254 sopDepth = reader.Depth;
255 // m_log.DebugFormat("[HG ASSET MAPPER]: Set sopDepth to {0}", sopDepth);
256 }
257 }
258 else
259 {
260 if (sopDepth >= 0 && reader.Depth == sopDepth + 1)
261 {
262 if (reader.Name == "CreatorID")
263 {
264 reader.Read();
265 if (reader.NodeType == XmlNodeType.Element && reader.Name == "Guid" || reader.Name == "UUID")
266 {
267 reader.Read();
268
269 if (reader.NodeType == XmlNodeType.Text)
270 {
271 UUID uuid = UUID.Zero;
272 UUID.TryParse(reader.Value, out uuid);
273 creator = userAccountService.GetUserAccount(scopeID, uuid);
274 writer.WriteElementString("UUID", reader.Value);
275 reader.Read();
276 }
277 else
278 {
279 // If we unexpected run across mixed content in this node, still carry on
280 // transforming the subtree (this replicates earlier behaviour).
281 TransformXml(reader, writer, sceneName, homeURI, userAccountService, scopeID);
282 }
283 }
284 else
285 {
286 // If we unexpected run across mixed content in this node, still carry on
287 // transforming the subtree (this replicates earlier behaviour).
288 TransformXml(reader, writer, sceneName, homeURI, userAccountService, scopeID);
289 }
290 }
291 else if (reader.Name == "CreatorData")
292 {
293 reader.Read();
294 if (reader.NodeType == XmlNodeType.Text)
295 {
296 hasCreatorData = true;
297 writer.WriteString(reader.Value);
298 }
299 else
300 {
301 // If we unexpected run across mixed content in this node, still carry on
302 // transforming the subtree (this replicates earlier behaviour).
303 TransformXml(reader, writer, sceneName, homeURI, userAccountService, scopeID);
304 }
305 }
306 }
307 }
308
309 if (reader.IsEmptyElement)
310 {
311 // m_log.DebugFormat("[HG ASSET MAPPER]: Writing end for empty element {0}", reader.Name);
312 writer.WriteEndElement();
313 }
314
315 break;
316
317 case XmlNodeType.EndElement:
318 // m_log.DebugFormat("Depth {0} at EndElement", reader.Depth);
319 if (sopDepth == reader.Depth)
320 {
321 if (!hasCreatorData && creator != null)
322 writer.WriteElementString(reader.Prefix, "CreatorData", reader.NamespaceURI, string.Format("{0};{1} {2}", homeURI, creator.FirstName, creator.LastName));
323
324 // m_log.DebugFormat("[HG ASSET MAPPER]: Reset sopDepth");
325 sopDepth = -1;
326 creator = null;
327 hasCreatorData = false;
328 }
329 writer.WriteEndElement();
330 break;
331
332 case XmlNodeType.EntityReference:
333 writer.WriteEntityRef(reader.Name);
334 break;
335
336 case XmlNodeType.ProcessingInstruction:
337 writer.WriteProcessingInstruction(reader.Name, reader.Value);
338 break;
339
340 case XmlNodeType.Text:
341 writer.WriteString(reader.Value);
342 break;
343
344 case XmlNodeType.XmlDeclaration:
345 // For various reasons, not all serializations have xml declarations (or consistent ones)
346 // and as it's embedded inside a byte stream we don't need it anyway, so ignore.
347 break;
348
349 default:
350 m_log.WarnFormat(
351 "[HG ASSET MAPPER]: Unrecognized node {0} in asset XML transform in {1}",
352 reader.NodeType, sceneName);
353 break;
354 }
355 }
356 }
357
176 public static string CalcCreatorData(string homeURL, string name) 358 public static string CalcCreatorData(string homeURL, string name)
177 { 359 {
178 return homeURL + ";" + name; 360 return homeURL + ";" + name;
diff --git a/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs b/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs
index 11573d2..0cce722 100644
--- a/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Serialization/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.1.*")] 32[assembly: AssemblyVersion("0.8.2.*")]
33 33
diff --git a/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs b/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs
index ddb7e59..63335bd 100644
--- a/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.8.1.*")] 32[assembly: AssemblyVersion("0.8.2.*")]
33 33
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index c22c119..e403ba0 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -292,11 +292,11 @@ namespace OpenSim.Framework.Servers
292 + " 3 = full stack trace, including common threads\n", 292 + " 3 = full stack trace, including common threads\n",
293 HandleDebugThreadpoolLevel); 293 HandleDebugThreadpoolLevel);
294 294
295 m_console.Commands.AddCommand( 295// m_console.Commands.AddCommand(
296 "Debug", false, "show threadpool calls active", 296// "Debug", false, "show threadpool calls active",
297 "show threadpool calls active", 297// "show threadpool calls active",
298 "Show details about threadpool calls that are still active (currently waiting or in progress)", 298// "Show details about threadpool calls that are still active (currently waiting or in progress)",
299 HandleShowThreadpoolCallsActive); 299// HandleShowThreadpoolCallsActive);
300 300
301 m_console.Commands.AddCommand( 301 m_console.Commands.AddCommand(
302 "Debug", false, "show threadpool calls complete", 302 "Debug", false, "show threadpool calls complete",