mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
Merge branch 'master' into mantis5110
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -139,13 +139,13 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
|
||||
os = AgentCreateRequest.GetRequestStream();
|
||||
os.Write(buffer, 0, strBuffer.Length); //Send it
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
|
||||
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
|
||||
uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY);
|
||||
}
|
||||
//catch (WebException ex)
|
||||
catch
|
||||
{
|
||||
//m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message);
|
||||
//m_log.ErrorFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message);
|
||||
reason = "cannot contact remote region";
|
||||
return false;
|
||||
}
|
||||
@@ -172,19 +172,19 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
webResponse = AgentCreateRequest.GetResponse();
|
||||
if (webResponse == null)
|
||||
{
|
||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post");
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
sr = new StreamReader(webResponse.GetResponseStream());
|
||||
response = sr.ReadToEnd().Trim();
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
|
||||
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
|
||||
}
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message);
|
||||
reason = "Destination did not reply";
|
||||
return string.Empty;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
catch (NullReferenceException e)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
|
||||
|
||||
// check for old style response
|
||||
if (response.ToLower().StartsWith("true"))
|
||||
@@ -232,7 +232,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
||||
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
||||
return null;
|
||||
}
|
||||
// Add the input arguments
|
||||
@@ -258,6 +258,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
|
||||
{
|
||||
// Eventually, we want to use a caps url instead of the agentID
|
||||
|
||||
string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
|
||||
|
||||
HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
|
||||
@@ -274,7 +275,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message);
|
||||
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message);
|
||||
}
|
||||
// Add the input arguments
|
||||
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
||||
@@ -303,12 +304,12 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send
|
||||
os = ChildUpdateRequest.GetRequestStream();
|
||||
os.Write(buffer, 0, strBuffer.Length); //Send it
|
||||
//m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri);
|
||||
//m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri);
|
||||
}
|
||||
catch (WebException ex)
|
||||
//catch
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -319,7 +320,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
|
||||
// Let's wait for the response
|
||||
//m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate");
|
||||
//m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate");
|
||||
|
||||
WebResponse webResponse = null;
|
||||
StreamReader sr = null;
|
||||
@@ -328,19 +329,19 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
webResponse = ChildUpdateRequest.GetResponse();
|
||||
if (webResponse == null)
|
||||
{
|
||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post");
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post");
|
||||
}
|
||||
|
||||
sr = new StreamReader(webResponse.GetResponseStream());
|
||||
//reply = sr.ReadToEnd().Trim();
|
||||
sr.ReadToEnd().Trim();
|
||||
sr.Close();
|
||||
//m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
|
||||
//m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
|
||||
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message);
|
||||
// ignore, really
|
||||
}
|
||||
finally
|
||||
@@ -371,7 +372,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
webResponse = (HttpWebResponse)request.GetResponse();
|
||||
if (webResponse == null)
|
||||
{
|
||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get ");
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get ");
|
||||
}
|
||||
|
||||
sr = new StreamReader(webResponse.GetResponseStream());
|
||||
@@ -381,7 +382,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message);
|
||||
// ignore, really
|
||||
return false;
|
||||
}
|
||||
@@ -420,7 +421,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
WebResponse webResponse = request.GetResponse();
|
||||
if (webResponse == null)
|
||||
{
|
||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent");
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent");
|
||||
}
|
||||
|
||||
sr = new StreamReader(webResponse.GetResponseStream());
|
||||
@@ -432,7 +433,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
@@ -448,7 +449,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
{
|
||||
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
||||
|
||||
|
||||
WebRequest request = WebRequest.Create(uri);
|
||||
request.Method = "DELETE";
|
||||
request.Timeout = 10000;
|
||||
@@ -459,7 +459,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
WebResponse webResponse = request.GetResponse();
|
||||
if (webResponse == null)
|
||||
{
|
||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete ");
|
||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete ");
|
||||
}
|
||||
|
||||
sr = new StreamReader(webResponse.GetResponseStream());
|
||||
@@ -471,7 +471,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
@@ -536,11 +536,11 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send
|
||||
os = ObjectCreateRequest.GetRequestStream();
|
||||
os.Write(buffer, 0, strBuffer.Length); //Send it
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri);
|
||||
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
@@ -558,7 +558,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
WebResponse webResponse = ObjectCreateRequest.GetResponse();
|
||||
if (webResponse == null)
|
||||
{
|
||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post");
|
||||
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -570,7 +570,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message);
|
||||
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user