Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
commit
30397b6fbc
|
@ -29,14 +29,15 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using System.Reflection;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class RegionLightShareData : ICloneable
|
public class RegionLightShareData : ICloneable
|
||||||
|
@ -96,10 +97,9 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SimpleRegionInfo
|
public class SimpleRegionInfo
|
||||||
{
|
{
|
||||||
// private static readonly log4net.ILog m_log
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The port by which http communication occurs with the region (most noticeably, CAPS communication)
|
/// The port by which http communication occurs with the region (most noticeably, CAPS communication)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -327,8 +327,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public class RegionInfo
|
public class RegionInfo
|
||||||
{
|
{
|
||||||
// private static readonly log4net.ILog m_log
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
public bool commFailTF = false;
|
public bool commFailTF = false;
|
||||||
public ConfigurationMember configMember;
|
public ConfigurationMember configMember;
|
||||||
|
@ -772,9 +771,16 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
if (externalName == "SYSTEMIP")
|
if (externalName == "SYSTEMIP")
|
||||||
|
{
|
||||||
m_externalHostName = Util.GetLocalHost().ToString();
|
m_externalHostName = Util.GetLocalHost().ToString();
|
||||||
|
m_log.InfoFormat(
|
||||||
|
"[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
|
||||||
|
m_externalHostName, name);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_externalHostName = externalName;
|
m_externalHostName = externalName;
|
||||||
|
}
|
||||||
|
|
||||||
m_regionType = config.GetString("RegionType", String.Empty);
|
m_regionType = config.GetString("RegionType", String.Empty);
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Error(string.Format("[BASE HTTP SERVER]: OnRequest() failed with "), e);
|
m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0}{1}", e.Message, e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
m_log.Warn("GET from URL " + url + " failed: " + ex.Message);
|
m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message);
|
||||||
errorMessage = ex.Message;
|
errorMessage = ex.Message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,9 +192,7 @@ namespace OpenSim
|
||||||
// Hook up to the watchdog timer
|
// Hook up to the watchdog timer
|
||||||
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
|
Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler;
|
||||||
|
|
||||||
PrintFileToConsole("startuplogo.txt");
|
PrintFileToConsole("startuplogo.txt");
|
||||||
|
|
||||||
m_log.InfoFormat("[NETWORK]: Using {0} as SYSTEMIP", Util.GetLocalHost().ToString());
|
|
||||||
|
|
||||||
// For now, start at the 'root' level by default
|
// For now, start at the 'root' level by default
|
||||||
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it
|
||||||
|
|
|
@ -659,7 +659,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (!Entities.Remove(agentID))
|
if (!Entities.Remove(agentID))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list",
|
"[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list",
|
||||||
agentID);
|
agentID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,12 +668,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
|
Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
|
||||||
List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
|
List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
|
||||||
|
|
||||||
// Remember the old presene reference from the dictionary
|
|
||||||
ScenePresence oldref = newmap[agentID];
|
|
||||||
// Remove the presence reference from the dictionary
|
// Remove the presence reference from the dictionary
|
||||||
if (newmap.Remove(agentID))
|
if (newmap.ContainsKey(agentID))
|
||||||
{
|
{
|
||||||
|
ScenePresence oldref = newmap[agentID];
|
||||||
|
newmap.Remove(agentID);
|
||||||
|
|
||||||
// Find the index in the list where the old ref was stored and remove the reference
|
// Find the index in the list where the old ref was stored and remove the reference
|
||||||
newlist.RemoveAt(newlist.IndexOf(oldref));
|
newlist.RemoveAt(newlist.IndexOf(oldref));
|
||||||
// Swap out the dictionary and list with new references
|
// Swap out the dictionary and list with new references
|
||||||
|
@ -682,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
|
m_log.WarnFormat("[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
@ -371,18 +371,33 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool Delete(string id)
|
public bool Delete(string id)
|
||||||
{
|
{
|
||||||
|
string errorMessage = String.Empty;
|
||||||
|
string url = m_serverUrl + id;
|
||||||
|
|
||||||
if (m_cache != null)
|
if (m_cache != null)
|
||||||
m_cache.Expire(id);
|
m_cache.Expire(id);
|
||||||
|
|
||||||
string url = m_serverUrl + id;
|
try
|
||||||
|
{
|
||||||
|
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
|
||||||
|
request.Method = "DELETE";
|
||||||
|
|
||||||
|
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
||||||
|
{
|
||||||
|
if (response.StatusCode != HttpStatusCode.NoContent)
|
||||||
|
{
|
||||||
|
m_log.Warn("[SIMIAN ASSET CONNECTOR]: Unexpected response when deleting asset " + url + ": " +
|
||||||
|
response.StatusCode + " (" + response.StatusDescription + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
OSDMap response = WebUtil.ServiceRequest(url, "DELETE");
|
|
||||||
if (response["Success"].AsBoolean())
|
|
||||||
return true;
|
return true;
|
||||||
else
|
}
|
||||||
m_log.Warn("[SIMIAN ASSET CONNECTOR]: Failed to delete asset " + id + " from the asset service");
|
catch (Exception ex)
|
||||||
|
{
|
||||||
return false;
|
m_log.Warn("[SIMIAN ASSET CONNECTOR]: Failed to delete asset " + id + " from the asset service: " + ex.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion IAssetService
|
#endregion IAssetService
|
||||||
|
|
Loading…
Reference in New Issue