aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-19 15:19:37 -0700
committerJohn Hurliman2009-10-19 15:19:37 -0700
commitbd03cbd8156e2044eed89ba2774bab43b9931aa1 (patch)
treec6dc15d4028b2d103b89296ac68b84482b77f5e8 /OpenSim/Framework
parent* Change Util.FireAndForget to use ThreadPool.UnsafeQueueUserWorkItem(). This... (diff)
parentMinor formatting cleanup. (diff)
downloadopensim-SC_OLD-bd03cbd8156e2044eed89ba2774bab43b9931aa1.zip
opensim-SC_OLD-bd03cbd8156e2044eed89ba2774bab43b9931aa1.tar.gz
opensim-SC_OLD-bd03cbd8156e2044eed89ba2774bab43b9931aa1.tar.bz2
opensim-SC_OLD-bd03cbd8156e2044eed89ba2774bab43b9931aa1.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/BlockingQueue.cs6
-rw-r--r--OpenSim/Framework/Serialization/External/LandDataSerializer.cs24
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs2
3 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs
index 857930a..3658161 100644
--- a/OpenSim/Framework/BlockingQueue.cs
+++ b/OpenSim/Framework/BlockingQueue.cs
@@ -67,8 +67,8 @@ namespace OpenSim.Framework
67 return m_pqueue.Dequeue(); 67 return m_pqueue.Dequeue();
68 68
69 if (m_queue.Count > 0) 69 if (m_queue.Count > 0)
70 return m_queue.Dequeue(); 70 return m_queue.Dequeue();
71 return default(T); 71 return default(T);
72 } 72 }
73 } 73 }
74 74
@@ -121,7 +121,7 @@ namespace OpenSim.Framework
121 { 121 {
122 m_pqueue.Clear(); 122 m_pqueue.Clear();
123 m_queue.Clear(); 123 m_queue.Clear();
124 Monitor.Pulse(m_queueSync); 124 Monitor.Pulse(m_queueSync);
125 } 125 }
126 } 126 }
127 } 127 }
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
index a3bc5d1..ff0afc8 100644
--- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Serialization.External
41 public class LandDataSerializer 41 public class LandDataSerializer
42 { 42 {
43 protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding(); 43 protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
44 44
45 /// <summary> 45 /// <summary>
46 /// Reify/deserialize landData 46 /// Reify/deserialize landData
47 /// </summary> 47 /// </summary>
@@ -52,7 +52,7 @@ namespace OpenSim.Framework.Serialization.External
52 { 52 {
53 return Deserialize(m_utf8Encoding.GetString(serializedLandData, 0, serializedLandData.Length)); 53 return Deserialize(m_utf8Encoding.GetString(serializedLandData, 0, serializedLandData.Length));
54 } 54 }
55 55
56 /// <summary> 56 /// <summary>
57 /// Reify/deserialize landData 57 /// Reify/deserialize landData
58 /// </summary> 58 /// </summary>
@@ -62,10 +62,10 @@ namespace OpenSim.Framework.Serialization.External
62 public static LandData Deserialize(string serializedLandData) 62 public static LandData Deserialize(string serializedLandData)
63 { 63 {
64 LandData landData = new LandData(); 64 LandData landData = new LandData();
65 65
66 StringReader sr = new StringReader(serializedLandData); 66 StringReader sr = new StringReader(serializedLandData);
67 XmlTextReader xtr = new XmlTextReader(sr); 67 XmlTextReader xtr = new XmlTextReader(sr);
68 68
69 xtr.ReadStartElement("LandData"); 69 xtr.ReadStartElement("LandData");
70 70
71 landData.Area = Convert.ToInt32( xtr.ReadElementString("Area")); 71 landData.Area = Convert.ToInt32( xtr.ReadElementString("Area"));
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Serialization.External
106 pae.Time = Convert.ToDateTime( xtr.ReadElementString("Time")); 106 pae.Time = Convert.ToDateTime( xtr.ReadElementString("Time"));
107 pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList")); 107 pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList"));
108 xtr.ReadEndElement(); 108 xtr.ReadEndElement();
109 109
110 landData.ParcelAccessList.Add(pae); 110 landData.ParcelAccessList.Add(pae);
111 } 111 }
112 } 112 }
@@ -122,13 +122,13 @@ namespace OpenSim.Framework.Serialization.External
122 landData.OtherCleanTime = Convert.ToInt32( xtr.ReadElementString("OtherCleanTime")); 122 landData.OtherCleanTime = Convert.ToInt32( xtr.ReadElementString("OtherCleanTime"));
123 123
124 xtr.ReadEndElement(); 124 xtr.ReadEndElement();
125 125
126 xtr.Close(); 126 xtr.Close();
127 sr.Close(); 127 sr.Close();
128 128
129 return landData; 129 return landData;
130 } 130 }
131 131
132 public static string Serialize(LandData landData) 132 public static string Serialize(LandData landData)
133 { 133 {
134 StringWriter sw = new StringWriter(); 134 StringWriter sw = new StringWriter();
@@ -137,8 +137,8 @@ namespace OpenSim.Framework.Serialization.External
137 137
138 xtw.WriteStartDocument(); 138 xtw.WriteStartDocument();
139 xtw.WriteStartElement("LandData"); 139 xtw.WriteStartElement("LandData");
140 140
141 xtw.WriteElementString("Area", Convert.ToString(landData.Area)); 141 xtw.WriteElementString("Area", Convert.ToString(landData.Area));
142 xtw.WriteElementString("AuctionID", Convert.ToString(landData.AuctionID)); 142 xtw.WriteElementString("AuctionID", Convert.ToString(landData.AuctionID));
143 xtw.WriteElementString("AuthBuyerID", landData.AuthBuyerID.ToString()); 143 xtw.WriteElementString("AuthBuyerID", landData.AuthBuyerID.ToString());
144 xtw.WriteElementString("Category", Convert.ToString((sbyte)landData.Category)); 144 xtw.WriteElementString("Category", Convert.ToString((sbyte)landData.Category));
@@ -170,7 +170,7 @@ namespace OpenSim.Framework.Serialization.External
170 xtw.WriteEndElement(); 170 xtw.WriteEndElement();
171 } 171 }
172 xtw.WriteEndElement(); 172 xtw.WriteEndElement();
173 173
174 xtw.WriteElementString("PassHours", Convert.ToString(landData.PassHours)); 174 xtw.WriteElementString("PassHours", Convert.ToString(landData.PassHours));
175 xtw.WriteElementString("PassPrice", Convert.ToString(landData.PassPrice)); 175 xtw.WriteElementString("PassPrice", Convert.ToString(landData.PassPrice));
176 xtw.WriteElementString("SalePrice", Convert.ToString(landData.SalePrice)); 176 xtw.WriteElementString("SalePrice", Convert.ToString(landData.SalePrice));
@@ -184,7 +184,7 @@ namespace OpenSim.Framework.Serialization.External
184 184
185 xtw.Close(); 185 xtw.Close();
186 sw.Close(); 186 sw.Close();
187 187
188 return sw.ToString(); 188 return sw.ToString();
189 } 189 }
190 } 190 }
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 845a9fe..0d93ff7 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -246,7 +246,7 @@ namespace OpenSim.Framework.Servers
246 foreach (ProcessThread t in threads) 246 foreach (ProcessThread t in threads)
247 { 247 {
248 sb.Append("ID: " + t.Id + ", TotalProcessorTime: " + t.TotalProcessorTime + ", TimeRunning: " + 248 sb.Append("ID: " + t.Id + ", TotalProcessorTime: " + t.TotalProcessorTime + ", TimeRunning: " +
249 (DateTime.Now - t.StartTime) + ", Pri: " + t.CurrentPriority + ", State: " + t.ThreadState ); 249 (DateTime.Now - t.StartTime) + ", Pri: " + t.CurrentPriority + ", State: " + t.ThreadState);
250 if (t.ThreadState == System.Diagnostics.ThreadState.Wait) 250 if (t.ThreadState == System.Diagnostics.ThreadState.Wait)
251 sb.Append(", Reason: " + t.WaitReason + Environment.NewLine); 251 sb.Append(", Reason: " + t.WaitReason + Environment.NewLine);
252 else 252 else