From cd6f4a57e7586ffd5c6dae91633e61e293272def Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Tue, 4 Mar 2008 04:11:37 +0000
Subject: Added copyright heaaders. Minor cleanup.
---
.../Region/ScriptEngine/Common/BuilIn_Commands.cs | 4 +--
OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs | 3 +-
.../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 2 +-
.../ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 7 ++---
.../Common/OSSL_BuilIn_Commands_Interface.cs | 2 +-
.../AsyncCommandPlugins/HttpRequest.cs | 5 +---
.../AsyncCommandPlugins/Listener.cs | 4 +--
.../AsyncCommandPlugins/SensorRepeat.cs | 10 +------
.../ScriptEngineBase/AsyncCommandPlugins/Timer.cs | 3 +-
.../AsyncCommandPlugins/XmlRequest.cs | 5 +---
.../ScriptEngine/Common/ScriptServerInterfaces.cs | 2 +-
.../Region/ScriptEngine/Common/TRPC/TCPClient.cs | 18 +++---------
.../Region/ScriptEngine/Common/TRPC/TCPCommon.cs | 8 +++---
.../Region/ScriptEngine/Common/TRPC/TCPServer.cs | 8 ++----
.../Region/ScriptEngine/Common/TRPC/TCPSocket.cs | 8 ++----
OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs | 32 ++++++++++------------
16 files changed, 41 insertions(+), 80 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine')
diff --git a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
index 024ad2b..d13a76c 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Common
///
/// This is the end of a chain of inherited builtin command implementations. This module will be instanced by script engines.
///
- public class BuilIn_Commands: OSSL_BuilIn_Commands
+ public class BuilIn_Commands : OSSL_BuilIn_Commands
{
public BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID,
LLUUID itemID) : base(scriptEngine, host, localID, itemID)
diff --git a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs
index 4fe4b71..30c40f4 100644
--- a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -103,6 +103,5 @@ namespace OpenSim.Region.ScriptEngine.Common
{
m_Running = false;
}
-
}
}
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 32c6414..d516aa5 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
index 27b3050..067b466 100644
--- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -43,7 +43,6 @@ namespace OpenSim.Region.ScriptEngine.Common
}
-
public OSSLPrim Prim;
[Serializable]
@@ -57,7 +56,6 @@ namespace OpenSim.Region.ScriptEngine.Common
Rotation = new OSSLPrim_Rotation(this);
}
-
public OSSLPrim_Position Position;
public OSSLPrim_Rotation Rotation;
//public LSL_Types.Vector3 Position
@@ -163,6 +161,7 @@ namespace OpenSim.Region.ScriptEngine.Common
}
}
}
+
[Serializable]
public class OSSLPrim_Rotation
{
@@ -245,7 +244,5 @@ namespace OpenSim.Region.ScriptEngine.Common
// public double Z;
// public double R;
//}
-
-
}
}
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs
index 49164c1..6221abd 100644
--- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs
+++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
index 94c536f..1f837a1 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -49,7 +49,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
m_CmdManager = CmdManager;
}
-
public void CheckHttpRequests()
{
if (m_CmdManager.m_ScriptEngine.World == null)
@@ -91,7 +90,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
httpInfo = iHttpReq.GetNextCompletedRequest();
}
}
-
-
}
}
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs
index 194cb6b2..2fd2e91 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Modules;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework;
-using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
{
@@ -49,7 +48,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
m_CmdManager = CmdManager;
}
-
public void CheckListeners()
{
if (m_CmdManager.m_ScriptEngine.World == null)
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index bff85af..84e8313 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Modules;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework;
-using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
{
@@ -49,7 +48,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
m_CmdManager = CmdManager;
}
-
public Dictionary> SenseEvents =
new Dictionary>();
private Object SenseLock = new Object();
@@ -183,7 +181,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
return SenseList;
}
}
-
}
private void SensorSweep(SenseRepeatClass ts)
@@ -261,7 +258,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
if (ang_obj > ts.arc) keep = false;
}
-
if (keep && (ts.keyID != null) && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID))
{
keep = false;
@@ -286,13 +282,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
objectname = SOP.Name;
}
-
if ((ts.name != entname) && (ts.name != avatarname) && (ts.name != objectname))
{
keep = false;
}
-
-
}
if (keep == true) SensedObjects.Add(ent.UUID);
@@ -326,7 +319,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
}
else
{
-
m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull,
new object[] { SensedObjects.Length });
}
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
index 02ef1a2..0ee5ee8 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Modules;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework;
-using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
{
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
index 15af51f..5d6d6ad 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Modules;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework;
-using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
{
@@ -105,7 +104,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
}
}
}
-
-
}
}
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
index 26e479c..b79ff05 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs
index 1fd7a25..236b685 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -37,21 +37,19 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
{
public class TCPClient : TCPCommon.ClientInterface
{
-
public TCPClient()
{
}
+
private readonly Dictionary Clients = new Dictionary();
private int ClientCount = 0;
-
public event TCPCommon.ClientConnectedDelegate ClientConnected;
public event TCPCommon.DataReceivedDelegate DataReceived;
public event TCPCommon.DataSentDelegate DataSent;
public event TCPCommon.CloseDelegate Close;
public event TCPCommon.ConnectErrorDelegate ConnectError;
-
///
/// Creates client connection
///
@@ -62,6 +60,7 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
//newsock.BeginConnect(ipe, new AsyncCallback(asyncConnected), newsock);
newsock.Connect(ipe);
}
+
public int ConnectAndReturnID(string RemoteHost, int RemotePort)
{
Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
@@ -71,7 +70,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
return ProcessConnection(newsock);
}
-
public void Disconnect(int ID)
{
Clients[ID].Disconnect();
@@ -88,9 +86,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
{
try
{
-
-
-
int id = ClientCount++;
TCPSocket S = new TCPSocket(id, client);
@@ -121,9 +116,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
return -1;
}
-
-
-
void S_DataSent(int ID, int length)
{
if (DataSent != null)
@@ -147,7 +139,5 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
{
Clients[clientID].Send(clientID, data, offset, len);
}
-
-
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs
index f3a55ba..c0e402a 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -36,7 +36,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
public delegate void CloseDelegate(int ID);
public delegate void ConnectErrorDelegate(string Reason);
-
public interface ServerAndClientInterface
{
void Send(int clientID, byte[] data, int offset, int len);
@@ -45,17 +44,18 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
event DataSentDelegate DataSent;
event CloseDelegate Close;
}
+
public interface ClientInterface : ServerAndClientInterface
{
event TCPCommon.ConnectErrorDelegate ConnectError;
void Connect(string RemoteHost, int RemotePort);
void Disconnect(int ID);
}
+
public interface ServerInterface : ServerAndClientInterface
{
void StartListen();
void StopListen();
}
-
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs
index da16da8..b1e6a82 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -68,7 +68,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
private readonly Dictionary Clients = new Dictionary();
private int ClientCount = 0;
-
public event TCPCommon.ClientConnectedDelegate ClientConnected;
public event TCPCommon.DataReceivedDelegate DataReceived;
public event TCPCommon.DataSentDelegate DataSent;
@@ -127,8 +126,5 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
{
Clients[clientID].Send(clientID, data, offset, len);
}
-
-
-
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs
index 1e47439..a14f245 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -33,7 +33,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
{
public class TCPSocket
{
-
public readonly Socket Client;
public readonly int ID;
@@ -52,6 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
ID = id;
Client = client;
}
+
public void Start()
{
// Start listening
@@ -85,10 +85,8 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
// Start new receive
BeginReceive();
-
}
-
public void Send(int clientID, byte[] data, int offset, int len)
{
Client.BeginSend(data, offset, len, SocketFlags.None, new AsyncCallback(asyncDataSent), Client);
@@ -111,4 +109,4 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
Close(ID);
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
index 5752e2b..40a910d 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -44,19 +44,19 @@ namespace OpenSim.Region.ScriptEngine.Common
public event ReceiveCommandDelegate ReceiveCommand;
System.Collections.Generic.Dictionary TypeDictionary = new Dictionary();
Type[] Types =
- {
- typeof(System.String),
- typeof(System.Int16),
- typeof(System.Int32),
- typeof(System.Int64),
- typeof(System.Double),
- typeof(System.Decimal),
- typeof(System.Array),
- typeof(LLUUID),
- typeof(System.UInt16),
- typeof(System.UInt32),
- typeof(System.UInt64)
- };
+ {
+ typeof(System.String),
+ typeof(System.Int16),
+ typeof(System.Int32),
+ typeof(System.Int64),
+ typeof(System.Double),
+ typeof(System.Decimal),
+ typeof(System.Array),
+ typeof(LLUUID),
+ typeof(System.UInt16),
+ typeof(System.UInt32),
+ typeof(System.UInt64)
+ };
// TODO: Maybe we should move queue into TCPSocket so we won't have to keep one queue instance per connection
private System.Collections.Generic.Dictionary InQueue = new Dictionary();
@@ -112,7 +112,6 @@ namespace OpenSim.Region.ScriptEngine.Common
private void ProcessQueue(int ID)
{
-
// This is just a temp implementation -- not so fast :)
InQueueStruct myIQS = InQueue[ID];
@@ -122,7 +121,6 @@ namespace OpenSim.Region.ScriptEngine.Common
string receivedData = Encoding.ASCII.GetString(myIQS.Queue, 0, myIQS.QueueSize);
Debug.WriteLine("RAW: " + receivedData);
-
byte newLine = 10;
while (true)
{
@@ -202,4 +200,4 @@ namespace OpenSim.Region.ScriptEngine.Common
TCPS.Send(ID, byteData, 0, byteData.Length);
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1