Formatting cleanup.

0.6.0-stable
Jeff Ames 2008-03-18 15:30:38 +00:00
parent aad69b9018
commit e5b9144282
13 changed files with 331 additions and 322 deletions

View File

@ -306,7 +306,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
uint regX = Convert.ToUInt32((Int32) requestData["start_region_x"]); uint regX = Convert.ToUInt32((Int32) requestData["start_region_x"]);
uint regY = Convert.ToUInt32((Int32) requestData["start_region_y"]); uint regY = Convert.ToUInt32((Int32) requestData["start_region_y"]);
LLUUID tempuserID = m_app.CreateUser(tempfirstname, templastname, tempPasswd, regX, regY); LLUUID tempuserID = m_app.CreateUser(tempfirstname, templastname, tempPasswd, regX, regY);
if (tempuserID == LLUUID.Zero) if (tempuserID == LLUUID.Zero)
{ {

View File

@ -162,7 +162,7 @@ namespace OpenSim.Framework.Data
simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]);
simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]);
simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
simData.serverURI = (string)responseData["server_uri"]; simData.serverURI = (string)responseData["server_uri"];
simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
simData.UUID = new LLUUID((string) responseData["region_UUID"]); simData.UUID = new LLUUID((string) responseData["region_UUID"]);
simData.regionName = (string) responseData["region_name"]; simData.regionName = (string) responseData["region_name"];
@ -205,7 +205,7 @@ namespace OpenSim.Framework.Data
simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]);
simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
simData.serverURI = (string)responseData["server_uri"]; simData.serverURI = (string)responseData["server_uri"];
simData.UUID = new LLUUID((string) responseData["region_UUID"]); simData.UUID = new LLUUID((string) responseData["region_UUID"]);
simData.regionName = (string) responseData["region_name"]; simData.regionName = (string) responseData["region_name"];

View File

@ -39,7 +39,7 @@ namespace OpenSim.Framework
Up = 1, Up = 1,
Crashed = 2, Crashed = 2,
Starting = 3, Starting = 3,
SlaveScene = 4 SlaveScene = 4
}; };
public interface IScene public interface IScene

View File

@ -34,12 +34,12 @@ namespace OpenSim.Framework
{ {
public sealed class PacketPool public sealed class PacketPool
{ {
static public void EncodeProxyMessage(byte[] bytes, ref int numBytes, EndPoint trueEP) static public void EncodeProxyMessage(byte[] bytes, ref int numBytes, EndPoint trueEP)
{ {
if( numBytes > 4090 ) // max UPD size = 4096 if( numBytes > 4090 ) // max UPD size = 4096
{ {
throw new Exception("ERROR: No space to encode the proxy EP"); throw new Exception("ERROR: No space to encode the proxy EP");
} }
ushort port = (ushort) ((IPEndPoint) trueEP).Port; ushort port = (ushort) ((IPEndPoint) trueEP).Port;
bytes[numBytes++] = (byte)(port % 256); bytes[numBytes++] = (byte)(port % 256);
@ -55,10 +55,10 @@ namespace OpenSim.Framework
DecodeProxyMessage(bytes, ref numBytes); DecodeProxyMessage(bytes, ref numBytes);
numBytes = x; numBytes = x;
} }
static public EndPoint DecodeProxyMessage(byte[] bytes, ref int numBytes) static public EndPoint DecodeProxyMessage(byte[] bytes, ref int numBytes)
{ {
// IPv4 Only // IPv4 Only
byte[] addr = new byte[4]; byte[] addr = new byte[4];

View File

@ -455,7 +455,7 @@ namespace OpenSim
// set initial ServerURI // set initial ServerURI
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName
+ ":" + regionInfo.InternalEndPoint.Port.ToString(); + ":" + regionInfo.InternalEndPoint.Port.ToString();
if ((proxyUrl.Length > 0) && (portadd_flag)) if ((proxyUrl.Length > 0) && (portadd_flag))
{ {
@ -616,7 +616,7 @@ namespace OpenSim
public virtual void Shutdown() public virtual void Shutdown()
{ {
ProxyCommand(proxyUrl, "Stop"); ProxyCommand(proxyUrl, "Stop");
if (m_startupCommandsFile != String.Empty) if (m_startupCommandsFile != String.Empty)
{ {
RunCommandScript(m_shutdownCommandsFile); RunCommandScript(m_shutdownCommandsFile);
@ -632,7 +632,7 @@ namespace OpenSim
m_console.Close(); m_console.Close();
Environment.Exit(0); Environment.Exit(0);
} }
private void RunAutoTimerScript(object sender, EventArgs e) private void RunAutoTimerScript(object sender, EventArgs e)
{ {
@ -722,17 +722,23 @@ namespace OpenSim
} }
break; break;
case "scene-debug": case "scene-debug":
if (cmdparams.Length == 3) { if (cmdparams.Length == 3)
if (m_sceneManager.CurrentScene == null) { {
m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first"); if (m_sceneManager.CurrentScene == null)
} else { {
m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first");
} }
} else { else
m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)"); {
} m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2]));
break; }
}
else
{
m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)");
}
break;
case "help": case "help":
m_console.Notice("alert - send alert to a designated user or all users."); m_console.Notice("alert - send alert to a designated user or all users.");
@ -772,15 +778,15 @@ namespace OpenSim
break; break;
case "threads": case "threads":
//m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); // m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:");
//int _tc = 0; // int _tc = 0;
//foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) // foreach (ProcessThread pt in Process.GetCurrentProcess().Threads)
//{ // {
// _tc++; // _tc++;
// m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString());
// }
//}
List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads(); List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads();
if (threads == null) if (threads == null)
{ {
@ -797,7 +803,6 @@ namespace OpenSim
} }
} }
break; break;
case "save-xml": case "save-xml":
if (cmdparams.Length > 0) if (cmdparams.Length > 0)
@ -833,7 +838,7 @@ namespace OpenSim
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]);
} }
m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
loadOffset.Z + ">"); loadOffset.Z + ">");
} }
} }
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
@ -1158,11 +1163,11 @@ namespace OpenSim
case "regions": case "regions":
m_sceneManager.ForEachScene( m_sceneManager.ForEachScene(
delegate(Scene scene) delegate(Scene scene)
{ {
m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
scene.RegionInfo.RegionLocX + " , Region YLoc: " + scene.RegionInfo.RegionLocX + " , Region YLoc: " +
scene.RegionInfo.RegionLocY); scene.RegionInfo.RegionLocY);
}); });
break; break;
case "stats": case "stats":
@ -1191,7 +1196,8 @@ namespace OpenSim
} }
#endregion #endregion
// TODO: remove me!! (almost same as XmlRpcCommand)
// TODO: remove me!! (almost same as XmlRpcCommand)
public object ProxyCommand(string url, string methodName, params object[] args) public object ProxyCommand(string url, string methodName, params object[] args)
{ {
if(proxyUrl.Length==0) return null; if(proxyUrl.Length==0) return null;
@ -1230,34 +1236,33 @@ namespace OpenSim
/// <param name="starttime">The first out parameter describing when the Region server started</param> /// <param name="starttime">The first out parameter describing when the Region server started</param>
/// <param name="uptime">The second out parameter describing how long the Region server has run</param> /// <param name="uptime">The second out parameter describing how long the Region server has run</param>
public void GetRunTime(out string starttime, out string uptime) public void GetRunTime(out string starttime, out string uptime)
{ {
starttime = m_startuptime.ToString(); starttime = m_startuptime.ToString();
uptime = (DateTime.Now - m_startuptime).ToString(); uptime = (DateTime.Now - m_startuptime).ToString();
} }
/// <summary> /// <summary>
/// Get the number of the avatars in the Region server /// Get the number of the avatars in the Region server
/// </summary> /// </summary>
/// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param>
public void GetAvatarNumber(out int usernum) public void GetAvatarNumber(out int usernum)
{ {
usernum = m_sceneManager.GetCurrentSceneAvatars().Count; usernum = m_sceneManager.GetCurrentSceneAvatars().Count;
} }
/// <summary> /// <summary>
/// Get the number of the avatars in the Region server /// Get the number of the avatars in the Region server
/// </summary> /// </summary>
/// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param>
public void GetRegionNumber(out int regionnum) public void GetRegionNumber(out int regionnum)
{ {
int accounter = 0; int accounter = 0;
//List<string> regionNameList = new List<string>(); //List<string> regionNameList = new List<string>();
m_sceneManager.ForEachScene(delegate(Scene scene) { m_sceneManager.ForEachScene(delegate(Scene scene) {
accounter++; accounter++;
}); });
regionnum = accounter; regionnum = accounter;
}
}
} }
} }

View File

@ -226,7 +226,7 @@ namespace OpenSim.Region.ClientStack
try try
{ {
packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer); packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
} }
catch (Exception e) catch (Exception e)
{ {
@ -308,7 +308,7 @@ namespace OpenSim.Region.ClientStack
{ {
m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString()); m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString());
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
ReceivedData, null); ReceivedData, null);
} }
} }
} }
@ -332,31 +332,31 @@ namespace OpenSim.Region.ClientStack
//Slave regions don't accept new clients //Slave regions don't accept new clients
if(m_localScene.Region_Status != RegionStatus.SlaveScene) if(m_localScene.Region_Status != RegionStatus.SlaveScene)
{ {
UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet;
lock (clientCircuits) lock (clientCircuits)
{ {
if (!clientCircuits.ContainsKey(epSender)) if (!clientCircuits.ContainsKey(epSender))
clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); clientCircuits.Add(epSender, useCircuit.CircuitCode.Code);
else else
m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
} }
lock (clientCircuits_reverse) lock (clientCircuits_reverse)
{ {
if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code)) if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code))
clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender); clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender);
else else
m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
} }
lock (proxyCircuits) lock (proxyCircuits)
{ {
if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code))
proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy); proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy);
else else
m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding."); m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
} }
PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy); PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy);
} }
PacketPool.Instance.ReturnPacket(packet); PacketPool.Instance.ReturnPacket(packet);
} }
@ -394,20 +394,20 @@ namespace OpenSim.Region.ClientStack
lock (clientCircuits_reverse) lock (clientCircuits_reverse)
{ {
if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto)) if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto))
{ {
//we found the endpoint so send the packet to it //we found the endpoint so send the packet to it
if (proxyPortOffset != 0) if (proxyPortOffset != 0)
{ {
//MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString()); //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString());
PacketPool.EncodeProxyMessage(buffer, ref size, sendto); PacketPool.EncodeProxyMessage(buffer, ref size, sendto);
Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]); Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]);
} }
else else
{ {
//MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString()); //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString());
Server.SendTo(buffer, size, flags, sendto); Server.SendTo(buffer, size, flags, sendto);
} }
} }
} }
} }
@ -421,7 +421,7 @@ namespace OpenSim.Region.ClientStack
clientCircuits.Remove(sendto); clientCircuits.Remove(sendto);
clientCircuits_reverse.Remove(circuitcode); clientCircuits_reverse.Remove(circuitcode);
proxyCircuits.Remove(circuitcode); proxyCircuits.Remove(circuitcode);
} }
} }
} }
@ -435,7 +435,7 @@ namespace OpenSim.Region.ClientStack
useCircuit.CircuitCode.ID = circuit.AgentID; useCircuit.CircuitCode.ID = circuit.AgentID;
useCircuit.CircuitCode.SessionID = circuit.SessionID; useCircuit.CircuitCode.SessionID = circuit.SessionID;
lock (clientCircuits) lock (clientCircuits)
{ {
if (!clientCircuits.ContainsKey(userEP)) if (!clientCircuits.ContainsKey(userEP))
clientCircuits.Add(userEP, useCircuit.CircuitCode.Code); clientCircuits.Add(userEP, useCircuit.CircuitCode.Code);
@ -453,15 +453,15 @@ namespace OpenSim.Region.ClientStack
lock (proxyCircuits) lock (proxyCircuits)
{ {
if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code))
{ {
proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP);
} }
else else
{ {
// re-set proxy endpoint // re-set proxy endpoint
proxyCircuits.Remove(useCircuit.CircuitCode.Code); proxyCircuits.Remove(useCircuit.CircuitCode.Code);
proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP); proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP);
} }
} }
PacketServer.AddNewClient(userEP, useCircuit, m_assetCache, m_authenticateSessionsClass, proxyEP); PacketServer.AddNewClient(userEP, useCircuit, m_assetCache, m_authenticateSessionsClass, proxyEP);

View File

@ -111,7 +111,7 @@ namespace OpenSim.Region.Communications.OGS1
GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString();
GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString(); GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString();
GridParams["originUUID"] = regionInfo.originRegionID.ToString(); GridParams["originUUID"] = regionInfo.originRegionID.ToString();
GridParams["server_uri"] = regionInfo.ServerURI; GridParams["server_uri"] = regionInfo.ServerURI;
// part of an initial brutish effort to provide accurate information (as per the xml region spec) // part of an initial brutish effort to provide accurate information (as per the xml region spec)
// wrt the ownership of a given region // wrt the ownership of a given region
@ -190,7 +190,7 @@ namespace OpenSim.Region.Communications.OGS1
return false; return false;
} }
// What does DeregisterRegion() do? // What does DeregisterRegion() do?
return m_localBackend.DeregisterRegion(regionInfo); return m_localBackend.DeregisterRegion(regionInfo);
} }
@ -633,10 +633,10 @@ namespace OpenSim.Region.Communications.OGS1
m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found"); m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found");
} }
remObject = null; remObject = null;
//m_log.Info("[INTER]: " + // m_log.Info("[INTER]: " +
//gdebugRegionName + // gdebugRegionName +
//": OGS1 tried to Update Child Agent data on outside region and got " + // ": OGS1 tried to Update Child Agent data on outside region and got " +
//retValue.ToString()); // retValue.ToString());
return retValue; return retValue;
} }
@ -693,7 +693,7 @@ namespace OpenSim.Region.Communications.OGS1
NoteDeadRegion(regionHandle); NoteDeadRegion(regionHandle);
m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}", m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}",
regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY);
m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
return false; return false;
@ -1194,7 +1194,7 @@ namespace OpenSim.Region.Communications.OGS1
{ {
NoteDeadRegion(regionHandle); NoteDeadRegion(regionHandle);
m_log.Warn("[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + m_log.Warn("[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName +
" " + regInfo.RegionLocX + "," + regInfo.RegionLocY); " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
//m_log.Debug(e.ToString()); //m_log.Debug(e.ToString());
return false; return false;
} }
@ -1202,10 +1202,10 @@ namespace OpenSim.Region.Communications.OGS1
{ {
NoteDeadRegion(regionHandle); NoteDeadRegion(regionHandle);
m_log.Warn("[OGS1 GRID SERVICES]: Socket Error: Unable to connect to adjacent region using tcp://" + m_log.Warn("[OGS1 GRID SERVICES]: Socket Error: Unable to connect to adjacent region using tcp://" +
regInfo.RemotingAddress + regInfo.RemotingAddress +
":" + regInfo.RemotingPort + ":" + regInfo.RemotingPort +
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
" - Is this neighbor up?"); " - Is this neighbor up?");
m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
return false; return false;
} }
@ -1213,9 +1213,9 @@ namespace OpenSim.Region.Communications.OGS1
{ {
NoteDeadRegion(regionHandle); NoteDeadRegion(regionHandle);
m_log.Warn("[OGS1 GRID SERVICES]: Invalid Credentials: Unable to connect to adjacent region using tcp://" + m_log.Warn("[OGS1 GRID SERVICES]: Invalid Credentials: Unable to connect to adjacent region using tcp://" +
regInfo.RemotingAddress + regInfo.RemotingAddress +
":" + regInfo.RemotingPort + ":" + regInfo.RemotingPort +
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
return false; return false;
} }
@ -1223,9 +1223,9 @@ namespace OpenSim.Region.Communications.OGS1
{ {
NoteDeadRegion(regionHandle); NoteDeadRegion(regionHandle);
m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region using tcp://" + m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region using tcp://" +
regInfo.RemotingAddress + regInfo.RemotingAddress +
":" + regInfo.RemotingPort + ":" + regInfo.RemotingPort +
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
return false; return false;
} }
@ -1233,9 +1233,9 @@ namespace OpenSim.Region.Communications.OGS1
{ {
NoteDeadRegion(regionHandle); NoteDeadRegion(regionHandle);
m_log.Warn("[OGS1 GRID SERVICES]: WebException exception: Unable to connect to adjacent region using tcp://" + m_log.Warn("[OGS1 GRID SERVICES]: WebException exception: Unable to connect to adjacent region using tcp://" +
regInfo.RemotingAddress + regInfo.RemotingAddress +
":" + regInfo.RemotingPort + ":" + regInfo.RemotingPort +
"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
return false; return false;
} }

View File

@ -91,7 +91,8 @@ namespace OpenSim.Region.Environment.Modules
// setup IRC Relay // setup IRC Relay
if (m_irc == null) { m_irc = new IRCChatModule(config); } if (m_irc == null) { m_irc = new IRCChatModule(config); }
if (m_irc_connector == null) { if (m_irc_connector == null)
{
m_irc_connector = new Thread(IRCConnectRun); m_irc_connector = new Thread(IRCConnectRun);
m_irc_connector.Name = "IRCConnectorThread"; m_irc_connector.Name = "IRCConnectorThread";
m_irc_connector.IsBackground = true; m_irc_connector.IsBackground = true;
@ -106,12 +107,14 @@ namespace OpenSim.Region.Environment.Modules
try try
{ {
//m_irc.Connect(m_scenes); //m_irc.Connect(m_scenes);
if (m_irc_connector == null) { if (m_irc_connector == null)
{
m_irc_connector = new Thread(IRCConnectRun); m_irc_connector = new Thread(IRCConnectRun);
m_irc_connector.Name = "IRCConnectorThread"; m_irc_connector.Name = "IRCConnectorThread";
m_irc_connector.IsBackground = true; m_irc_connector.IsBackground = true;
} }
if (!m_irc_connector.IsAlive) { if (!m_irc_connector.IsAlive)
{
m_irc_connector.Start(); m_irc_connector.Start();
OpenSim.Framework.ThreadTracker.Add(m_irc_connector); OpenSim.Framework.ThreadTracker.Add(m_irc_connector);
} }
@ -255,11 +258,14 @@ namespace OpenSim.Region.Environment.Modules
// In a non-blocking way. Eventually the connector will get it started // In a non-blocking way. Eventually the connector will get it started
try try
{ {
if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); if (m_irc_connector == null)
m_irc_connector.Name = "IRCConnectorThread"; {
m_irc_connector.IsBackground = true; m_irc_connector = new Thread(IRCConnectRun);
m_irc_connector.Name = "IRCConnectorThread";
m_irc_connector.IsBackground = true;
} }
if (!m_irc_connector.IsAlive) { if (!m_irc_connector.IsAlive)
{
m_irc_connector.Start(); m_irc_connector.Start();
OpenSim.Framework.ThreadTracker.Add(m_irc_connector); OpenSim.Framework.ThreadTracker.Add(m_irc_connector);
} }
@ -298,7 +304,6 @@ namespace OpenSim.Region.Environment.Modules
if ((m_irc.Enabled)&&(!m_irc.Connected)) if ((m_irc.Enabled)&&(!m_irc.Connected))
{ {
m_irc.Connect(m_scenes); m_irc.Connect(m_scenes);
} }
Thread.Sleep(15000); Thread.Sleep(15000);
} }
@ -625,15 +630,15 @@ namespace OpenSim.Region.Environment.Modules
foreach (Scene m_scene in m_scenes) foreach (Scene m_scene in m_scenes)
{ {
m_scene.ForEachScenePresence(delegate(ScenePresence avatar) m_scene.ForEachScenePresence(delegate(ScenePresence avatar)
{ {
if (!avatar.IsChildAgent) if (!avatar.IsChildAgent)
{ {
avatar.ControllingClient.SendChatMessage( avatar.ControllingClient.SendChatMessage(
Helpers.StringToField(message), 255, Helpers.StringToField(message), 255,
pos, sender, pos, sender,
LLUUID.Zero); LLUUID.Zero);
} }
}); });
} }
} }
catch (Exception ex) // IRC gate should not crash Sim catch (Exception ex) // IRC gate should not crash Sim
@ -644,15 +649,15 @@ namespace OpenSim.Region.Environment.Modules
public enum ErrorReplies public enum ErrorReplies
{ {
NotRegistered = 451, // ":You have not registered" NotRegistered = 451, // ":You have not registered"
NicknameInUse = 433 // "<nick> :Nickname is already in use" NicknameInUse = 433 // "<nick> :Nickname is already in use"
} }
public enum Replies public enum Replies
{ {
MotdStart = 375, // ":- <server> Message of the day - " MotdStart = 375, // ":- <server> Message of the day - "
Motd = 372, // ":- <text>" Motd = 372, // ":- <text>"
EndOfMotd = 376 // ":End of /MOTD command" EndOfMotd = 376 // ":End of /MOTD command"
} }
public void ProcessIRCCommand(string command) public void ProcessIRCCommand(string command)

View File

@ -126,41 +126,43 @@ namespace OpenSim.Region.Environment.Modules
} }
/* private void CairoDraw(string data, System.Drawing.Graphics graph) /*
{ private void CairoDraw(string data, System.Drawing.Graphics graph)
using (Win32Surface draw = new Win32Surface(graph.GetHdc())) {
{ using (Win32Surface draw = new Win32Surface(graph.GetHdc()))
Context contex = new Context(draw); {
Context contex = new Context(draw);
contex.Antialias = Antialias.None; //fastest method but low quality contex.Antialias = Antialias.None; //fastest method but low quality
contex.LineWidth = 7; contex.LineWidth = 7;
char[] lineDelimiter = { ';' }; char[] lineDelimiter = { ';' };
char[] partsDelimiter = { ',' }; char[] partsDelimiter = { ',' };
string[] lines = data.Split(lineDelimiter); string[] lines = data.Split(lineDelimiter);
foreach (string line in lines) foreach (string line in lines)
{ {
string nextLine = line.Trim(); string nextLine = line.Trim();
if (nextLine.StartsWith("MoveTO")) if (nextLine.StartsWith("MoveTO"))
{ {
float x = 0; float x = 0;
float y = 0; float y = 0;
GetParams(partsDelimiter, ref nextLine, ref x, ref y); GetParams(partsDelimiter, ref nextLine, ref x, ref y);
contex.MoveTo(x, y); contex.MoveTo(x, y);
} }
else if (nextLine.StartsWith("LineTo")) else if (nextLine.StartsWith("LineTo"))
{ {
float x = 0; float x = 0;
float y = 0; float y = 0;
GetParams(partsDelimiter, ref nextLine, ref x, ref y); GetParams(partsDelimiter, ref nextLine, ref x, ref y);
contex.LineTo(x, y); contex.LineTo(x, y);
contex.Stroke(); contex.Stroke();
} }
} }
} }
graph.ReleaseHdc(); graph.ReleaseHdc();
}*/ }
*/
private void GDIDraw(string data, System.Drawing.Graphics graph) private void GDIDraw(string data, System.Drawing.Graphics graph)
{ {
@ -172,7 +174,6 @@ namespace OpenSim.Region.Environment.Modules
char[] lineDelimiter = { ';' }; char[] lineDelimiter = { ';' };
char[] partsDelimiter = { ',' }; char[] partsDelimiter = { ',' };
string[] lines = data.Split(lineDelimiter); string[] lines = data.Split(lineDelimiter);
foreach (string line in lines) foreach (string line in lines)
{ {

View File

@ -201,12 +201,12 @@ namespace OpenSim.Region.Environment
objflags &= (uint) objflags &= (uint)
~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object ~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object
LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object
LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod) LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod)
LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object
LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
); );
// Creating the three ObjectFlags options for this method to choose from. // Creating the three ObjectFlags options for this method to choose from.
// Customize the OwnerMask // Customize the OwnerMask
@ -495,10 +495,10 @@ namespace OpenSim.Region.Environment
return IsAdministrator(user); return IsAdministrator(user);
} }
public virtual bool CanRunConsoleCommand(LLUUID user) public virtual bool CanRunConsoleCommand(LLUUID user)
{ {
return IsAdministrator(user); return IsAdministrator(user);
} }
public virtual bool CanTerraform(LLUUID user, LLVector3 position) public virtual bool CanTerraform(LLUUID user, LLVector3 position)
{ {

View File

@ -227,6 +227,7 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_innerScene.RestorePresences; } get { return m_innerScene.RestorePresences; }
set { m_innerScene.RestorePresences = value; } set { m_innerScene.RestorePresences = value; }
} }
#endregion #endregion
#region Constructors #region Constructors
@ -395,15 +396,15 @@ namespace OpenSim.Region.Environment.Scenes
try try
{ {
ForEachScenePresence(delegate(ScenePresence agent) ForEachScenePresence(delegate(ScenePresence agent)
{
// If agent is a root agent.
if (!agent.IsChildAgent)
{ {
// If agent is a root agent. //agent.ControllingClient.new
if (!agent.IsChildAgent) //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
{ InformClientOfNeighbor(agent, otherRegion);
//agent.ControllingClient.new
//this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
InformClientOfNeighbor(agent, otherRegion);
}
} }
}
); );
} }
catch (NullReferenceException) catch (NullReferenceException)
@ -463,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " +
((8 - m_RestartTimerCounter) * 15) + " seconds"); ((8 - m_RestartTimerCounter) * 15) + " seconds");
// SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) +
//" seconds"); //" seconds");
@ -505,15 +506,15 @@ namespace OpenSim.Region.Environment.Scenes
try try
{ {
ForEachScenePresence(delegate(ScenePresence agent) ForEachScenePresence(delegate(ScenePresence agent)
{
// If agent is a root agent.
if (!agent.IsChildAgent)
{ {
// If agent is a root agent. //agent.ControllingClient.new
if (!agent.IsChildAgent) //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
{ InformClientOfNeighbor(agent, region);
//agent.ControllingClient.new
//this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
InformClientOfNeighbor(agent, region);
}
} }
}
); );
} }
catch (NullReferenceException) catch (NullReferenceException)
@ -580,16 +581,16 @@ namespace OpenSim.Region.Environment.Scenes
m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName); m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName);
// Kick all ROOT agents with the message, 'The simulator is going down' // Kick all ROOT agents with the message, 'The simulator is going down'
ForEachScenePresence(delegate(ScenePresence avatar) ForEachScenePresence(delegate(ScenePresence avatar)
{ {
if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle)) if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle))
avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle); avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle);
if (!avatar.IsChildAgent) if (!avatar.IsChildAgent)
avatar.ControllingClient.Kick("The simulator is going down."); avatar.ControllingClient.Kick("The simulator is going down.");
avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator), avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator),
ThrottleOutPacketType.Task); ThrottleOutPacketType.Task);
}); });
// Wait here, or the kick messages won't actually get to the agents before the scene terminates. // Wait here, or the kick messages won't actually get to the agents before the scene terminates.
Thread.Sleep(500); Thread.Sleep(500);
@ -793,7 +794,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
tmpval = tmpval - (tmpval - 1.0f); tmpval = tmpval - (tmpval - 1.0f);
} }
m_timedilation = tmpval; m_timedilation = tmpval;
m_lastupdate = DateTime.Now; m_lastupdate = DateTime.Now;
} }
@ -884,9 +885,9 @@ namespace OpenSim.Region.Environment.Scenes
{ {
List<MapBlockData> mapBlocks = List<MapBlockData> mapBlocks =
m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9), m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9),
(int)(RegionInfo.RegionLocY - 9), (int)(RegionInfo.RegionLocY - 9),
(int)(RegionInfo.RegionLocX + 9), (int)(RegionInfo.RegionLocX + 9),
(int)(RegionInfo.RegionLocY + 9)); (int)(RegionInfo.RegionLocY + 9));
List<AssetBase> textures = new List<AssetBase>(); List<AssetBase> textures = new List<AssetBase>();
List<Image> bitImages = new List<Image>(); List<Image> bitImages = new List<Image>();
@ -1048,7 +1049,6 @@ namespace OpenSim.Region.Environment.Scenes
m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
} }
/// <summary> /// <summary>
/// Returns a new unallocated primitive ID /// Returns a new unallocated primitive ID
/// </summary> /// </summary>
@ -1134,7 +1134,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
Tree treeType, bool newTree) Tree treeType, bool newTree)
{ {
LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID; LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID;
PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
@ -1228,7 +1228,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
pos.Y = ((pos.Y - Constants.RegionSize)); pos.Y = ((pos.Y - Constants.RegionSize));
newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize)); newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize));
// y + 1 // y + 1
} }
else if (position.Y < -1f) else if (position.Y < -1f)
{ {
@ -1269,12 +1269,14 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
} }
public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData) public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData)
{ {
m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor");
m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData);
} }
#endregion #endregion
#region Add/Remove Avatar Methods #region Add/Remove Avatar Methods
@ -1301,11 +1303,11 @@ namespace OpenSim.Region.Environment.Scenes
m_innerScene.AddScenePresence(presence); m_innerScene.AddScenePresence(presence);
lock (m_restorePresences) lock (m_restorePresences)
{ {
Monitor.PulseAll(m_restorePresences); Monitor.PulseAll(m_restorePresences);
} }
} }
else else
{ {
m_log.Info("[REGION]: Add New Scene Presence"); m_log.Info("[REGION]: Add New Scene Presence");
@ -1382,8 +1384,8 @@ namespace OpenSim.Region.Environment.Scenes
client.OnMoveInventoryItem += MoveInventoryItem; client.OnMoveInventoryItem += MoveInventoryItem;
client.OnRemoveInventoryItem += RemoveInventoryItem; client.OnRemoveInventoryItem += RemoveInventoryItem;
client.OnRemoveInventoryFolder += RemoveInventoryFolder; client.OnRemoveInventoryFolder += RemoveInventoryFolder;
// client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest; // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
// client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer; // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
client.OnRezScript += RezScript; client.OnRezScript += RezScript;
client.OnRequestTaskInventory += RequestTaskInventory; client.OnRequestTaskInventory += RequestTaskInventory;
@ -1452,8 +1454,8 @@ namespace OpenSim.Region.Environment.Scenes
{ {
m_innerScene.removeUserCount(true); m_innerScene.removeUserCount(true);
m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle,
avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y,
avatar.AbsolutePosition.Z); avatar.AbsolutePosition.Z);
List<ulong> childknownRegions = new List<ulong>(); List<ulong> childknownRegions = new List<ulong>();
List<ulong> ckn = avatar.GetKnownRegionList(); List<ulong> ckn = avatar.GetKnownRegionList();
for (int i = 0; i < ckn.Count; i++) for (int i = 0; i < ckn.Count; i++)
@ -1477,16 +1479,16 @@ namespace OpenSim.Region.Environment.Scenes
} }
m_eventManager.TriggerOnRemovePresence(agentID); m_eventManager.TriggerOnRemovePresence(agentID);
Broadcast(delegate(IClientAPI client) Broadcast(delegate(IClientAPI client)
{
try
{ {
try client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
{ }
client.SendKillObject(avatar.RegionHandle, avatar.LocalId); catch (System.NullReferenceException)
} {
catch (System.NullReferenceException) //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway.
{ }
//We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. });
}
});
ForEachScenePresence( ForEachScenePresence(
delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
@ -1903,8 +1905,6 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
#endregion #endregion
#region Other Methods #region Other Methods
@ -2152,10 +2152,10 @@ namespace OpenSim.Region.Environment.Scenes
{ {
ClientManager.ForEachClient(delegate(IClientAPI controller) ClientManager.ForEachClient(delegate(IClientAPI controller)
{ {
controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message);
} }
); );
} }
/// <summary> /// <summary>
@ -2180,27 +2180,27 @@ namespace OpenSim.Region.Environment.Scenes
if (agentID == kickUserID) if (agentID == kickUserID)
{ {
ClientManager.ForEachClient(delegate(IClientAPI controller) ClientManager.ForEachClient(delegate(IClientAPI controller)
{ {
if (controller.AgentId != godID) if (controller.AgentId != godID)
controller.Kick(Helpers.FieldToUTF8String(reason)); controller.Kick(Helpers.FieldToUTF8String(reason));
} }
); );
// This is a bit crude. It seems the client will be null before it actually stops the thread // This is a bit crude. It seems the client will be null before it actually stops the thread
// The thread will kill itself eventually :/ // The thread will kill itself eventually :/
// Is there another way to make sure *all* clients get this 'inter region' message? // Is there another way to make sure *all* clients get this 'inter region' message?
ClientManager.ForEachClient(delegate(IClientAPI controller) ClientManager.ForEachClient(delegate(IClientAPI controller)
{ {
ScenePresence p = GetScenePresence(controller.AgentId); ScenePresence p = GetScenePresence(controller.AgentId);
bool childagent = !p.Equals(null) && p.IsChildAgent; bool childagent = !p.Equals(null) && p.IsChildAgent;
if (controller.AgentId != godID && !childagent) if (controller.AgentId != godID && !childagent)
// Do we really want to kick the initiator of this madness? // Do we really want to kick the initiator of this madness?
{ {
controller.Close(true); controller.Close(true);
}
} }
}
); );
} }
else else

View File

@ -115,12 +115,11 @@ namespace OpenSim.Region.Environment.Scenes
protected AvatarAppearance m_appearance; protected AvatarAppearance m_appearance;
//neighbouring regions we have enabled a child agent in
private readonly List<ulong> m_knownChildRegions = new List<ulong>(); private readonly List<ulong> m_knownChildRegions = new List<ulong>();
//neighbouring regions we have enabled a child agent in
private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement; private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement;
/// <summary> /// <summary>
/// Implemented Control Flags /// Implemented Control Flags
/// </summary> /// </summary>
@ -1447,12 +1446,12 @@ namespace OpenSim.Region.Environment.Scenes
m_perfMonMS=System.Environment.TickCount; m_perfMonMS=System.Environment.TickCount;
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
{
if (scenePresence.UUID != UUID)
{ {
if (scenePresence.UUID != UUID) m_appearance.SendAppearanceToOtherAgent(scenePresence);
{ }
m_appearance.SendAppearanceToOtherAgent(scenePresence); });
}
});
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
} }
@ -1780,9 +1779,9 @@ namespace OpenSim.Region.Environment.Scenes
} }
[SecurityPermission(SecurityAction.LinkDemand, [SecurityPermission(SecurityAction.LinkDemand,
Flags = SecurityPermissionFlag.SerializationFormatter)] Flags = SecurityPermissionFlag.SerializationFormatter)]
public virtual void GetObjectData( public virtual void GetObjectData(
SerializationInfo info, StreamingContext context) SerializationInfo info, StreamingContext context)
{ {
if (info == null) if (info == null)
{ {
@ -1792,7 +1791,6 @@ namespace OpenSim.Region.Environment.Scenes
info.AddValue("FullID", FullID.UUID); info.AddValue("FullID", FullID.UUID);
info.AddValue("LastFullUpdateTime", LastFullUpdateTime); info.AddValue("LastFullUpdateTime", LastFullUpdateTime);
info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime); info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime);
} }
} }
@ -1929,9 +1927,9 @@ namespace OpenSim.Region.Environment.Scenes
m_requestedSitOffset m_requestedSitOffset
= new LLVector3( = new LLVector3(
(float)info.GetValue("m_requestedSitOffset.X", typeof(float)), (float)info.GetValue("m_requestedSitOffset.X", typeof(float)),
(float)info.GetValue("m_requestedSitOffset.Y", typeof(float)), (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)),
(float)info.GetValue("m_requestedSitOffset.Z", typeof(float))); (float)info.GetValue("m_requestedSitOffset.Z", typeof(float)));
m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float)); m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float));
m_godlevel = (float)info.GetValue("m_godlevel", typeof(float)); m_godlevel = (float)info.GetValue("m_godlevel", typeof(float));
@ -1939,10 +1937,10 @@ namespace OpenSim.Region.Environment.Scenes
m_bodyRot m_bodyRot
= new Quaternion( = new Quaternion(
(float)info.GetValue("m_bodyRot.w", typeof(float)), (float)info.GetValue("m_bodyRot.w", typeof(float)),
(float)info.GetValue("m_bodyRot.x", typeof(float)), (float)info.GetValue("m_bodyRot.x", typeof(float)),
(float)info.GetValue("m_bodyRot.y", typeof(float)), (float)info.GetValue("m_bodyRot.y", typeof(float)),
(float)info.GetValue("m_bodyRot.z", typeof(float))); (float)info.GetValue("m_bodyRot.z", typeof(float)));
IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool)); IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool));
m_newForce = (bool)info.GetValue("m_newForce", typeof(bool)); m_newForce = (bool)info.GetValue("m_newForce", typeof(bool));
@ -1964,33 +1962,33 @@ namespace OpenSim.Region.Environment.Scenes
lastPhysPos lastPhysPos
= new LLVector3( = new LLVector3(
(float)info.GetValue("lastPhysPos.X", typeof(float)), (float)info.GetValue("lastPhysPos.X", typeof(float)),
(float)info.GetValue("lastPhysPos.Y", typeof(float)), (float)info.GetValue("lastPhysPos.Y", typeof(float)),
(float)info.GetValue("lastPhysPos.Z", typeof(float))); (float)info.GetValue("lastPhysPos.Z", typeof(float)));
m_CameraCenter m_CameraCenter
= new Vector3( = new Vector3(
(float)info.GetValue("m_CameraCenter.X", typeof(float)), (float)info.GetValue("m_CameraCenter.X", typeof(float)),
(float)info.GetValue("m_CameraCenter.Y", typeof(float)), (float)info.GetValue("m_CameraCenter.Y", typeof(float)),
(float)info.GetValue("m_CameraCenter.Z", typeof(float))); (float)info.GetValue("m_CameraCenter.Z", typeof(float)));
m_CameraAtAxis m_CameraAtAxis
= new Vector3( = new Vector3(
(float)info.GetValue("m_CameraAtAxis.X", typeof(float)), (float)info.GetValue("m_CameraAtAxis.X", typeof(float)),
(float)info.GetValue("m_CameraAtAxis.Y", typeof(float)), (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)),
(float)info.GetValue("m_CameraAtAxis.Z", typeof(float))); (float)info.GetValue("m_CameraAtAxis.Z", typeof(float)));
m_CameraLeftAxis m_CameraLeftAxis
= new Vector3( = new Vector3(
(float)info.GetValue("m_CameraLeftAxis.X", typeof(float)), (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)),
(float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)), (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)),
(float)info.GetValue("m_CameraLeftAxis.Z", typeof(float))); (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float)));
m_CameraUpAxis m_CameraUpAxis
= new Vector3( = new Vector3(
(float)info.GetValue("m_CameraUpAxis.X", typeof(float)), (float)info.GetValue("m_CameraUpAxis.X", typeof(float)),
(float)info.GetValue("m_CameraUpAxis.Y", typeof(float)), (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)),
(float)info.GetValue("m_CameraUpAxis.Z", typeof(float))); (float)info.GetValue("m_CameraUpAxis.Z", typeof(float)));
m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float)); m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float));
m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance)); m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance));
@ -1998,9 +1996,9 @@ namespace OpenSim.Region.Environment.Scenes
posLastSignificantMove posLastSignificantMove
= new LLVector3( = new LLVector3(
(float)info.GetValue("posLastSignificantMove.X", typeof(float)), (float)info.GetValue("posLastSignificantMove.X", typeof(float)),
(float)info.GetValue("posLastSignificantMove.Y", typeof(float)), (float)info.GetValue("posLastSignificantMove.Y", typeof(float)),
(float)info.GetValue("posLastSignificantMove.Z", typeof(float))); (float)info.GetValue("posLastSignificantMove.Z", typeof(float)));
// m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue));
@ -2018,41 +2016,41 @@ namespace OpenSim.Region.Environment.Scenes
m_lastname = (string)info.GetValue("m_lastname", typeof(string)); m_lastname = (string)info.GetValue("m_lastname", typeof(string));
m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool)); m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool));
m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)), m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)),
(float)info.GetValue("m_parentPosition.Y", typeof(float)), (float)info.GetValue("m_parentPosition.Y", typeof(float)),
(float)info.GetValue("m_parentPosition.Z", typeof(float))); (float)info.GetValue("m_parentPosition.Z", typeof(float)));
m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool)); m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool));
m_parentID = (uint)info.GetValue("m_parentID", typeof(uint)); m_parentID = (uint)info.GetValue("m_parentID", typeof(uint));
// for OpenSim_v0.5 // for OpenSim_v0.5
currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid))); currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid)));
lastKnownAllowedPosition lastKnownAllowedPosition
= new Vector3( = new Vector3(
(float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)),
(float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)),
(float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float)));
sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool));
m_LastChildAgentUpdatePosition m_LastChildAgentUpdatePosition
= new LLVector3( = new LLVector3(
(float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)),
(float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)),
(float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float)));
m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int));
m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint));
m_headrotation m_headrotation
= new LLQuaternion( = new LLQuaternion(
(float)info.GetValue("m_headrotation.W", typeof(float)), (float)info.GetValue("m_headrotation.W", typeof(float)),
(float)info.GetValue("m_headrotation.X", typeof(float)), (float)info.GetValue("m_headrotation.X", typeof(float)),
(float)info.GetValue("m_headrotation.Y", typeof(float)), (float)info.GetValue("m_headrotation.Y", typeof(float)),
(float)info.GetValue("m_headrotation.Z", typeof(float))); (float)info.GetValue("m_headrotation.Z", typeof(float)));
m_state = (byte)info.GetValue("m_state", typeof(byte)); m_state = (byte)info.GetValue("m_state", typeof(byte));
List<Guid> knownPrimUUID_work = (List<Guid>)info.GetValue("m_knownPrimUUID", typeof(List<Guid>)); List<Guid> knownPrimUUID_work = (List<Guid>)info.GetValue("m_knownPrimUUID", typeof(List<Guid>));
foreach (Guid id in knownPrimUUID_work) foreach (Guid id in knownPrimUUID_work)
@ -2064,9 +2062,9 @@ namespace OpenSim.Region.Environment.Scenes
} }
[SecurityPermission(SecurityAction.LinkDemand, [SecurityPermission(SecurityAction.LinkDemand,
Flags = SecurityPermissionFlag.SerializationFormatter)] Flags = SecurityPermissionFlag.SerializationFormatter)]
public override void GetObjectData( public override void GetObjectData(
SerializationInfo info, StreamingContext context) SerializationInfo info, StreamingContext context)
{ {
if (info == null) if (info == null)
{ {
@ -2196,17 +2194,17 @@ namespace OpenSim.Region.Environment.Scenes
info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X); info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X);
info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y); info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y);
info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z); info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z);
info.AddValue("m_perfMonMS", m_perfMonMS); info.AddValue("m_perfMonMS", m_perfMonMS);
info.AddValue("m_AgentControlFlags", m_AgentControlFlags); info.AddValue("m_AgentControlFlags", m_AgentControlFlags);
info.AddValue("m_headrotation.W", m_headrotation.W); info.AddValue("m_headrotation.W", m_headrotation.W);
info.AddValue("m_headrotation.X", m_headrotation.X); info.AddValue("m_headrotation.X", m_headrotation.X);
info.AddValue("m_headrotation.Y", m_headrotation.Y); info.AddValue("m_headrotation.Y", m_headrotation.Y);
info.AddValue("m_headrotation.Z", m_headrotation.Z); info.AddValue("m_headrotation.Z", m_headrotation.Z);
info.AddValue("m_state", m_state); info.AddValue("m_state", m_state);
List<Guid> knownPrimUUID_work = new List<Guid>(); List<Guid> knownPrimUUID_work = new List<Guid>();
foreach (LLUUID id in m_knownPrimUUID) foreach (LLUUID id in m_knownPrimUUID)
@ -2215,6 +2213,6 @@ namespace OpenSim.Region.Environment.Scenes
} }
info.AddValue("m_knownPrimUUID", knownPrimUUID_work); info.AddValue("m_knownPrimUUID", knownPrimUUID_work);
} }
} }
} }

View File

@ -636,15 +636,15 @@ namespace OpenSim.Region.ScriptEngine.Common
//OpenSim functions //OpenSim functions
string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
int timer, int alpha); int timer, int alpha);
string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer);
string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
int timer, int alpha); int timer, int alpha);
double osTerrainGetHeight(int x, int y); double osTerrainGetHeight(int x, int y);
int osTerrainSetHeight(int x, int y, double val); int osTerrainSetHeight(int x, int y, double val);
int osRegionRestart(double seconds); int osRegionRestart(double seconds);
void osRegionNotice(string msg); void osRegionNotice(string msg);
bool osConsoleCommand(string Command); bool osConsoleCommand(string Command);
void osSetParcelMediaURL(string url); void osSetParcelMediaURL(string url);
void osSetPrimFloatOnWater(int floatYN); void osSetPrimFloatOnWater(int floatYN);