mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
cosmetics
This commit is contained in:
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
||||
|
||||
try
|
||||
{
|
||||
using(Stream s = rc.Request(m_Auth))
|
||||
using(MemoryStream s = rc.Request(m_Auth))
|
||||
{
|
||||
using(XmlTextReader sr = new XmlTextReader(s))
|
||||
{
|
||||
|
||||
@@ -46,9 +46,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||
{
|
||||
public class UserAgentServiceConnector : SimulationServiceConnector, IUserAgentService
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_ServerURL;
|
||||
private GridRegion m_Gatekeeper;
|
||||
@@ -84,6 +82,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||
private bool setServiceURL(string url)
|
||||
{
|
||||
// validate url getting some extended error messages
|
||||
url = url.ToLower();
|
||||
try
|
||||
{
|
||||
Uri tmpuri = new Uri(url);
|
||||
@@ -120,19 +119,20 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||
return false;
|
||||
}
|
||||
|
||||
GridRegion home = new GridRegion();
|
||||
home.ServerURI = m_ServerURL;
|
||||
home.RegionID = destination.RegionID;
|
||||
home.RegionLocX = destination.RegionLocX;
|
||||
home.RegionLocY = destination.RegionLocY;
|
||||
GridRegion home = new GridRegion()
|
||||
{
|
||||
ServerURI = m_ServerURL,
|
||||
RegionID = destination.RegionID,
|
||||
RegionLocX = destination.RegionLocX,
|
||||
RegionLocY = destination.RegionLocY
|
||||
};
|
||||
|
||||
m_Gatekeeper = gatekeeper;
|
||||
|
||||
//Console.WriteLine(" >>> LoginAgentToGrid <<< " + home.ServerURI);
|
||||
|
||||
uint flags = fromLogin ? (uint)TeleportFlags.ViaLogin : (uint)TeleportFlags.ViaHome;
|
||||
EntityTransferContext ctx = new EntityTransferContext();
|
||||
return CreateAgent(source, home, aCircuit, flags, ctx, out reason);
|
||||
return CreateAgent(source, home, aCircuit, flags, new EntityTransferContext(), out reason);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,19 +175,17 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||
throw;
|
||||
}
|
||||
|
||||
if (response.IsFault)
|
||||
if (response == null || response.IsFault)
|
||||
{
|
||||
throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned an error: {2}", methodName, m_ServerURL, response.FaultString));
|
||||
}
|
||||
|
||||
hash = (Hashtable)response.Value;
|
||||
|
||||
if (hash == null)
|
||||
if (!(response.Value is Hashtable))
|
||||
{
|
||||
throw new Exception(string.Format("[USER AGENT CONNECTOR]: {0} call to {1} returned null", methodName, m_ServerURL));
|
||||
}
|
||||
|
||||
return hash;
|
||||
return (Hashtable)response.Value; ;
|
||||
}
|
||||
|
||||
public GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt)
|
||||
|
||||
Reference in New Issue
Block a user