Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
commit
0f93ea5d95
|
@ -88,7 +88,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
J2KImage imgrequest;
|
||||
|
||||
// Do a linear search for this texture download
|
||||
lock (m_priorityQueue)
|
||||
lock (m_syncRoot)
|
||||
m_priorityQueue.Find(delegate(J2KImage img) { return img.TextureID == newRequest.RequestedAssetID; }, out imgrequest);
|
||||
|
||||
if (imgrequest != null)
|
||||
|
@ -99,7 +99,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
try
|
||||
{
|
||||
lock (m_priorityQueue)
|
||||
lock (m_syncRoot)
|
||||
m_priorityQueue.Delete(imgrequest.PriorityQueueHandle);
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
@ -211,7 +211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
{
|
||||
J2KImage image = null;
|
||||
|
||||
lock (m_priorityQueue)
|
||||
lock (m_syncRoot)
|
||||
{
|
||||
|
||||
if (m_priorityQueue.Count > 0)
|
||||
|
@ -230,23 +230,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
{
|
||||
image.PriorityQueueHandle = null;
|
||||
|
||||
lock (m_priorityQueue)
|
||||
m_priorityQueue.Add(ref image.PriorityQueueHandle, image);
|
||||
lock (m_syncRoot)
|
||||
try
|
||||
{
|
||||
m_priorityQueue.Add(ref image.PriorityQueueHandle, image);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
void RemoveImageFromQueue(J2KImage image)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (m_priorityQueue)
|
||||
lock (m_syncRoot)
|
||||
try
|
||||
{
|
||||
m_priorityQueue.Delete(image.PriorityQueueHandle);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
void UpdateImageInQueue(J2KImage image)
|
||||
{
|
||||
lock (m_priorityQueue)
|
||||
lock (m_syncRoot)
|
||||
{
|
||||
try { m_priorityQueue.Replace(image.PriorityQueueHandle, image); }
|
||||
catch (Exception)
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace OpenSim.Server.Base
|
|||
|
||||
public static Dictionary<string, object> ParseXmlResponse(string data)
|
||||
{
|
||||
//m_log.DebugFormat("[XXX]: received xml string: {0}", data);
|
||||
m_log.DebugFormat("[XXX]: received xml string: {0}", data);
|
||||
|
||||
Dictionary<string, object> ret = new Dictionary<string, object>();
|
||||
|
||||
|
|
|
@ -137,11 +137,21 @@ namespace OpenSim.Server.Handlers.Grid
|
|||
}
|
||||
|
||||
Dictionary<string, object> rinfoData = new Dictionary<string, object>();
|
||||
foreach (KeyValuePair<string, string> kvp in request)
|
||||
rinfoData[kvp.Key] = kvp.Value;
|
||||
GridRegion rinfo = new GridRegion(rinfoData);
|
||||
GridRegion rinfo = null;
|
||||
try
|
||||
{
|
||||
foreach (KeyValuePair<string, string> kvp in request)
|
||||
rinfoData[kvp.Key] = kvp.Value;
|
||||
rinfo = new GridRegion(rinfoData);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e);
|
||||
}
|
||||
|
||||
bool result = m_GridService.RegisterRegion(scopeID, rinfo);
|
||||
bool result = false;
|
||||
if (rinfo != null)
|
||||
result = m_GridService.RegisterRegion(scopeID, rinfo);
|
||||
|
||||
if (result)
|
||||
return SuccessResult();
|
||||
|
|
|
@ -109,8 +109,13 @@ namespace OpenSim.Services.Connectors
|
|||
{
|
||||
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
|
||||
|
||||
if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success"))
|
||||
if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success"))
|
||||
return true;
|
||||
else if (!replyData.ContainsKey("Result"))
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field");
|
||||
else
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString());
|
||||
|
||||
}
|
||||
else
|
||||
m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply");
|
||||
|
|
Loading…
Reference in New Issue