aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-10-05 20:20:00 +0100
committerJustin Clark-Casey (justincc)2009-10-05 20:20:00 +0100
commit0f93ea5d9579e81df48c3d800bb0bb1d6d3bdc2f (patch)
treee0a7033458b4bb0545f4c7f7d8aecc445fd276b3
parentchange default ports for inventory and grid connectors in example .ini files ... (diff)
parentFixed bug introduced in one of the last commits. (diff)
downloadopensim-SC-0f93ea5d9579e81df48c3d800bb0bb1d6d3bdc2f.zip
opensim-SC-0f93ea5d9579e81df48c3d800bb0bb1d6d3bdc2f.tar.gz
opensim-SC-0f93ea5d9579e81df48c3d800bb0bb1d6d3bdc2f.tar.bz2
opensim-SC-0f93ea5d9579e81df48c3d800bb0bb1d6d3bdc2f.tar.xz
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs26
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs2
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs18
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs7
4 files changed, 36 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
index 2120d33..cc290ed 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
88 J2KImage imgrequest; 88 J2KImage imgrequest;
89 89
90 // Do a linear search for this texture download 90 // Do a linear search for this texture download
91 lock (m_priorityQueue) 91 lock (m_syncRoot)
92 m_priorityQueue.Find(delegate(J2KImage img) { return img.TextureID == newRequest.RequestedAssetID; }, out imgrequest); 92 m_priorityQueue.Find(delegate(J2KImage img) { return img.TextureID == newRequest.RequestedAssetID; }, out imgrequest);
93 93
94 if (imgrequest != null) 94 if (imgrequest != null)
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
99 99
100 try 100 try
101 { 101 {
102 lock (m_priorityQueue) 102 lock (m_syncRoot)
103 m_priorityQueue.Delete(imgrequest.PriorityQueueHandle); 103 m_priorityQueue.Delete(imgrequest.PriorityQueueHandle);
104 } 104 }
105 catch (Exception) { } 105 catch (Exception) { }
@@ -211,7 +211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
211 { 211 {
212 J2KImage image = null; 212 J2KImage image = null;
213 213
214 lock (m_priorityQueue) 214 lock (m_syncRoot)
215 { 215 {
216 216
217 if (m_priorityQueue.Count > 0) 217 if (m_priorityQueue.Count > 0)
@@ -230,23 +230,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
230 { 230 {
231 image.PriorityQueueHandle = null; 231 image.PriorityQueueHandle = null;
232 232
233 lock (m_priorityQueue) 233 lock (m_syncRoot)
234 m_priorityQueue.Add(ref image.PriorityQueueHandle, image); 234 try
235 {
236 m_priorityQueue.Add(ref image.PriorityQueueHandle, image);
237 }
238 catch (Exception) { }
235 } 239 }
236 240
237 void RemoveImageFromQueue(J2KImage image) 241 void RemoveImageFromQueue(J2KImage image)
238 { 242 {
239 try 243 lock (m_syncRoot)
240 { 244 try
241 lock (m_priorityQueue) 245 {
242 m_priorityQueue.Delete(image.PriorityQueueHandle); 246 m_priorityQueue.Delete(image.PriorityQueueHandle);
243 } 247 }
244 catch (Exception) { } 248 catch (Exception) { }
245 } 249 }
246 250
247 void UpdateImageInQueue(J2KImage image) 251 void UpdateImageInQueue(J2KImage image)
248 { 252 {
249 lock (m_priorityQueue) 253 lock (m_syncRoot)
250 { 254 {
251 try { m_priorityQueue.Replace(image.PriorityQueueHandle, image); } 255 try { m_priorityQueue.Replace(image.PriorityQueueHandle, image); }
252 catch (Exception) 256 catch (Exception)
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 0964caa..9d9735e 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -260,7 +260,7 @@ namespace OpenSim.Server.Base
260 260
261 public static Dictionary<string, object> ParseXmlResponse(string data) 261 public static Dictionary<string, object> ParseXmlResponse(string data)
262 { 262 {
263 //m_log.DebugFormat("[XXX]: received xml string: {0}", data); 263 m_log.DebugFormat("[XXX]: received xml string: {0}", data);
264 264
265 Dictionary<string, object> ret = new Dictionary<string, object>(); 265 Dictionary<string, object> ret = new Dictionary<string, object>();
266 266
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
index e22328d..08edcbf 100644
--- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
@@ -137,11 +137,21 @@ namespace OpenSim.Server.Handlers.Grid
137 } 137 }
138 138
139 Dictionary<string, object> rinfoData = new Dictionary<string, object>(); 139 Dictionary<string, object> rinfoData = new Dictionary<string, object>();
140 foreach (KeyValuePair<string, string> kvp in request) 140 GridRegion rinfo = null;
141 rinfoData[kvp.Key] = kvp.Value; 141 try
142 GridRegion rinfo = new GridRegion(rinfoData); 142 {
143 foreach (KeyValuePair<string, string> kvp in request)
144 rinfoData[kvp.Key] = kvp.Value;
145 rinfo = new GridRegion(rinfoData);
146 }
147 catch (Exception e)
148 {
149 m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e);
150 }
143 151
144 bool result = m_GridService.RegisterRegion(scopeID, rinfo); 152 bool result = false;
153 if (rinfo != null)
154 result = m_GridService.RegisterRegion(scopeID, rinfo);
145 155
146 if (result) 156 if (result)
147 return SuccessResult(); 157 return SuccessResult();
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index ba46b0d..acdf558 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -109,8 +109,13 @@ namespace OpenSim.Services.Connectors
109 { 109 {
110 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 110 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
111 111
112 if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) 112 if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success"))
113 return true; 113 return true;
114 else if (!replyData.ContainsKey("Result"))
115 m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field");
116 else
117 m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString());
118
114 } 119 }
115 else 120 else
116 m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply"); 121 m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply");