Massive tab and trailing space cleanup

This commit is contained in:
Melanie Thielker
2017-01-05 19:07:37 +00:00
parent e88e2945e9
commit b16abc8166
959 changed files with 23646 additions and 23646 deletions

View File

@@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.LindenCaps
{
data = new AgentPrefs(agent);
}
if (req.ContainsKey("access_prefs"))
{
OSDMap accessPrefs = (OSDMap)req["access_prefs"]; // We could check with ContainsKey...

View File

@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.Linden
public class AvatarPickerSearchModule : INonSharedRegionModule
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
private IPeople m_People;
private bool m_Enabled = false;

View File

@@ -97,7 +97,7 @@ namespace OpenSim.Region.ClientStack.Linden
private ModelCost m_ModelCost;
// private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
// These are callbacks which will be setup by the scene so that we can update scene data when we
// receive capability calls
public NewInventoryItem AddNewInventoryItem = null;
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ClientStack.Linden
private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory
// may not be visible till relog
private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!!
private UUID m_testAssetsCreatorID = UUID.Zero;
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ClientStack.Linden
processUpload = 3
}
private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle;
public BunchOfCaps(Scene scene, UUID agentID, Caps caps)
{
m_Scene = scene;
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden
// create a model upload cost provider
m_ModelCost = new ModelCost(scene);
m_PrimScaleMin = m_ModelCost.PrimScaleMin;
IConfigSource config = m_Scene.Config;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.ClientStack.Linden
public string GetNewCapPath()
{
return "/CAPS/" + UUID.Random();
return "/CAPS/" + UUID.Random();
}
/// <summary>
@@ -271,7 +271,7 @@ namespace OpenSim.Region.ClientStack.Linden
"POST", GetNewCapPath(), HomeLocation, "HomeLocation", null);
m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler);
}
if(m_AllowCapGroupMemberData)
{
IRequestHandler GroupMemberDataHandler = new RestStreamHandler(
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ClientStack.Linden
IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler(
"POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null);
m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler);
}
catch (Exception e)
{
@@ -568,8 +568,8 @@ namespace OpenSim.Region.ClientStack.Linden
{
string error;
int modelcost;
if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost,
meshcostdata, out error, ref warning))
{
@@ -639,7 +639,7 @@ namespace OpenSim.Region.ClientStack.Linden
client.SendAgentAlertMessage(warning, true);
}
}
string assetDes = llsdRequest.description;
UUID newAsset = UUID.Random();
UUID newInvItem = UUID.Random();
@@ -813,7 +813,7 @@ namespace OpenSim.Region.ClientStack.Linden
List<UUID> textures = new List<UUID>();
// if (doTextInv)
m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
@@ -895,7 +895,7 @@ namespace OpenSim.Region.ClientStack.Linden
meshAvatarSkeletons.Add(curAvSkeleton);
meshAvatarColliders.Add(curAvCollider);
// test code
// test code
if (curAvSkeleton && client != null)
{
string name = assetName;
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.ClientStack.Linden
prim.LastOwnerID = creatorID;
prim.RezzerID = creatorID;
prim.CreationDate = Util.UnixTimeSinceEpoch();
if (grp == null)
prim.Name = assetName;
else
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.ClientStack.Linden
public string GetObjectCost(string request, string path,
string param, IOSHttpRequest httpRequest,
IOSHttpResponse httpResponse)
{
{
OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
OSDMap resp = new OSDMap();
@@ -1446,7 +1446,7 @@ namespace OpenSim.Region.ClientStack.Linden
for (int i = 0; i < object_ids.Count; i++)
{
UUID uuid = object_ids[i].AsUUID();
SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid);
SceneObjectGroup grp = null;
if (part != null)
@@ -1479,7 +1479,7 @@ namespace OpenSim.Region.ClientStack.Linden
resp[UUID.Zero.ToString()] = object_data;
}
string response = OSDParser.SerializeLLSDXmlString(resp);
return response;
return response;
}
public string ResourceCostSelected(string request, string path,
@@ -1548,7 +1548,7 @@ namespace OpenSim.Region.ClientStack.Linden
resp["selected"] = object_data;
// resp["transaction_id"] = "undef";
string response = OSDParser.SerializeLLSDXmlString(resp);
return response;
return response;
}
public string UpdateAgentInformation(string request, string path,
@@ -1564,7 +1564,7 @@ namespace OpenSim.Region.ClientStack.Linden
resp["access_prefs"] = accessPrefs;
string response = OSDParser.SerializeLLSDXmlString(resp);
return response;
return response;
}
public bool OSDMapTOVector3(OSDMap map, out Vector3 v)
@@ -1598,19 +1598,19 @@ namespace OpenSim.Region.ClientStack.Linden
IClientAPI client = null;
ScenePresence sp;
while(true)
{
if(m_Scene.GridUserService == null)
break;
if(m_Scene.UserManagementModule == null)
break;
m_Scene.TryGetScenePresence(m_AgentID, out sp);
if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
break;
client = sp.ControllingClient;
if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID))
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.ClientStack.Linden
ILandObject land = m_Scene.LandChannel.GetLandObject(pos);
if(land == null)
break;
ulong gpowers = client.GetGroupPowers(land.LandData.GroupID);
SceneObjectGroup telehub = null;
if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
@@ -1648,7 +1648,7 @@ namespace OpenSim.Region.ClientStack.Linden
!m_Scene.Permissions.IsGod(m_AgentID) &&
m_AgentID != land.LandData.OwnerID && // (b) land owners can set home
// (c) members of the land-associated group in roles that can set home
((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) &&
((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) &&
// (d) parcels with telehubs can be the home of anyone
(telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y)))
{
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.ClientStack.Linden
break;
}
string response;
if(fail)
@@ -1728,11 +1728,11 @@ namespace OpenSim.Region.ClientStack.Linden
m_GroupsModule = m_Scene.RequestModuleInterface<IGroupsModule>();
if(m_GroupsModule == null)
break;
m_Scene.TryGetScenePresence(m_AgentID, out sp);
if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
break;
client = sp.ControllingClient;
OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
@@ -1866,12 +1866,12 @@ namespace OpenSim.Region.ClientStack.Linden
OSDMap osdname = new OSDMap();
if(parts[0] == "Unknown")
{
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2));
}
else
{
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1));
}
osdname["display_name"] = OSD.FromString(kvp.Value);
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.ClientStack.Linden
private string m_assetType = String.Empty;
private int m_cost;
private string m_error = String.Empty;
private Timer m_timeoutTimer = new Timer();
private UUID m_texturesFolder;
private int m_nreqtextures;
@@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.Linden
private int m_groupMask;
private int m_everyoneMask;
public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem,
UUID parentFolderID, string invType, string assetType, string path,
IHttpServer httpServer, bool dumpAssetsToFile,

View File

@@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
}
public void Close() { }
public void Close() { }
public void AddRegion(Scene scene)
{
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
public void PostInitialise() { }
#endregion
#endregion
private void OnRegisterCaps(UUID agentID, Caps caps)
{

View File

@@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
public struct ModelPrimLimits
{
}
public class ModelCost
@@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.Linden
const float lowestSizeWth = 2f; // 3x
// favor potencially physical optimized meshs versus automatic decomposition
const float physMeshSizeWth = 6f; // counts 7x
const float physHullSizeWth = 8f; // counts 9x
const float physHullSizeWth = 8f; // counts 9x
// stream cost area factors
// stream cost area factors
// more or less like SL
const float highLodFactor = 17.36f;
const float midLodFactor = 277.78f;
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack.Linden
PrimScaleMin = scene.m_minNonphys;
NonPhysicalPrimScaleMax = scene.m_maxNonphys;
PhysicalPrimScaleMax = scene.m_maxPhys;
ObjectLinkedPartsMax = scene.m_linksetCapacity;
ObjectLinkedPartsMax = scene.m_linksetCapacity;
}
public void Econfig(IConfig EconomyConfig)
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack.Linden
bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost);
}
// storage for a single mesh asset cost parameters
// storage for a single mesh asset cost parameters
private class ameshCostParam
{
// LOD sizes for size dependent streaming cost
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ClientStack.Linden
// resources input LLSD request
// basicCost input region assets upload cost
// totalcost returns model total upload fee
// meshcostdata returns detailed costs for viewer
// meshcostdata returns detailed costs for viewer
// avatarSkeleton if mesh includes a avatar skeleton
// useAvatarCollider if we should use physics mesh for avatar
public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost,
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ClientStack.Linden
error = string.Empty;
bool avatarSkeleton = false;
if (resources == null ||
resources.instance_list == null ||
resources.instance_list.Array.Count == 0)
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack.Linden
if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0)
{
numberMeshs = resources.mesh_list.Array.Count;
for (int i = 0; i < numberMeshs; i++)
{
ameshCostParam curCost = new ameshCostParam();
@@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
// instances (prims) cost
int mesh;
int skipedSmall = 0;
@@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack.Linden
// breakdown prices
// don't seem to be in use so removed code for now
return true;
}
@@ -404,7 +404,7 @@ namespace OpenSim.Region.ClientStack.Linden
int sksize = tmpmap["size"].AsInteger();
if(sksize > 0)
skeleton = true;
}
}
}
if (map.ContainsKey("physics_convex"))
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
submesh_offset = -1;
// only look for LOD meshs sizes
if (map.ContainsKey("high_lod"))
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
cost.physicsCost = 0.04f * phys_hullsvertices;
float sfee;
sfee = data.Length; // start with total compressed data size
// penalize lod meshs that should be more builder optimized
@@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack.Linden
// bytes to money
sfee *= bytecost;
cost.costFee = sfee;
return true;
}
@@ -675,7 +675,7 @@ namespace OpenSim.Region.ClientStack.Linden
return true;
}
// returns streaming cost from on mesh LODs sizes in curCost and square of prim size length
// returns streaming cost from on mesh LODs sizes in curCost and square of prim size length
private float streamingCost(ameshCostParam curCost, float sqdiam)
{
// compute efective areas

View File

@@ -74,12 +74,12 @@ namespace OpenSim.Region.ClientStack.Linden
private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000);
protected Scene m_scene;
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
private Dictionary<UUID, Queue<OSD>> queues = new Dictionary<UUID, Queue<OSD>>();
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
#region INonSharedRegionModule methods
public virtual void Initialise(IConfigSource config)
{
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ClientStack.Linden
foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
{
MainConsole.Instance.OutputFormat(
"For agent {0} there are {1} messages queued for send.",
"For agent {0} there are {1} messages queued for send.",
kvp.Key, kvp.Value.Count);
}
}
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
if (DebugLevel > 0)
m_log.DebugFormat(
"[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
"[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
agentId, m_scene.RegionInfo.RegionName);
queues[agentId] = new Queue<OSD>();
@@ -238,13 +238,13 @@ namespace OpenSim.Region.ClientStack.Linden
"[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}",
avatarID, evMap["message"], m_scene.Name);
}
}
}
catch (NullReferenceException e)
{
m_log.Error("[EVENTQUEUE] Caught exception: " + e);
return false;
}
return true;
}
@@ -309,10 +309,10 @@ namespace OpenSim.Region.ClientStack.Linden
// push markers to handle old responses still waiting
// this will cost at most viewer getting two forced noevents
// even being a new queue better be safe
// even being a new queue better be safe
queue.Enqueue(null);
queue.Enqueue(null); // one should be enough
lock (m_AvatarQueueUUIDMapping)
{
eventQueueGetUUID = UUID.Random();
@@ -336,7 +336,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
// push markers to handle old responses still waiting
// this will cost at most viewer getting two forced noevents
// even being a new queue better be safe
// even being a new queue better be safe
queue.Enqueue(null);
queue.Enqueue(null); // one should be enough
@@ -405,7 +405,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
public void Drop(UUID requestID, UUID pAgentId)
{
// do nothing for now, hope client close will do it
// do nothing for now, hope client close will do it
}
public Hashtable GetEvents(UUID requestID, UUID pAgentId)
@@ -437,7 +437,7 @@ namespace OpenSim.Region.ClientStack.Linden
negativeID = true;
thisID = -thisID;
}
while (queue.Count > 0)
{
element = queue.Dequeue();
@@ -477,7 +477,7 @@ namespace OpenSim.Region.ClientStack.Linden
// if there where no elements before a marker send a NoEvents
if (array.Count == 0)
return NoEvents(requestID, pAgentId);
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 200;
responsedata["content_type"] = "application/xml";
@@ -500,7 +500,7 @@ namespace OpenSim.Region.ClientStack.Linden
responsedata["http_protocol_version"] = "HTTP/1.0";
return responsedata;
}
public void DisableSimulator(ulong handle, UUID avatarID)
{
OSD item = EventQueueHelper.DisableSimulator(handle);
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath,
ulong regionHandle, int regionSizeX, int regionSizeY)
ulong regionHandle, int regionSizeX, int regionSizeY)
{
if (DebugLevel > 0)
m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}",
@@ -528,9 +528,9 @@ namespace OpenSim.Region.ClientStack.Linden
Enqueue(item, avatarID);
}
public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess,
public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess,
IPEndPoint regionExternalEndPoint,
uint locationID, uint flags, string capsURL,
uint locationID, uint flags, string capsURL,
UUID avatarID, int regionSizeX, int regionSizeY)
{
if (DebugLevel > 0)
@@ -560,15 +560,15 @@ namespace OpenSim.Region.ClientStack.Linden
uint timeStamp, bool offline, int parentEstateID, Vector3 position,
uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket)
{
OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
timeStamp, offline, parentEstateID, position, ttl, transactionID,
OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
timeStamp, offline, parentEstateID, position, ttl, transactionID,
fromGroup, binaryBucket);
Enqueue(item, toAgent);
//m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item);
}
public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat,
public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat,
bool isModerator, bool textMute, bool isEnterorLeave)
{
OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat,

View File

@@ -105,7 +105,7 @@ namespace OpenSim.Region.ClientStack.Linden
return BuildEvent("DisableSimulator", llsdBody);
}
public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
IPEndPoint newRegionExternalEndPoint,
string capsURL, UUID agentID, UUID sessionID,
@@ -194,13 +194,13 @@ namespace OpenSim.Region.ClientStack.Linden
script.Add("ItemID", OSD.FromUUID(itemID));
script.Add("Running", OSD.FromBoolean(running));
script.Add("Mono", OSD.FromBoolean(mono));
OSDArray scriptArr = new OSDArray();
scriptArr.Add(script);
OSDMap body = new OSDMap();
body.Add("Script", scriptArr);
return BuildEvent("ScriptRunningReply", body);
}
@@ -243,7 +243,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
OSDMap messageParams = new OSDMap(15);
messageParams.Add("type", new OSDInteger((int)dialog));
OSDArray positionArray = new OSDArray(3);
positionArray.Add(OSD.FromReal(position.X));
positionArray.Add(OSD.FromReal(position.Y));
@@ -423,7 +423,7 @@ namespace OpenSim.Region.ClientStack.Linden
QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID));
QueryDataMap.Add("ProductSku", OSD.FromInteger(0));
QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price));
QueryData.Add(QueryDataMap);
}
body.Add("QueryData", QueryData);
@@ -444,7 +444,7 @@ namespace OpenSim.Region.ClientStack.Linden
public static OSD partPhysicsProperties(uint localID, byte physhapetype,
float density, float friction, float bounce, float gravmod)
{
OSDMap physinfo = new OSDMap(6);
physinfo["LocalID"] = localID;
physinfo["Density"] = density;

View File

@@ -180,7 +180,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
UUID npcId
UUID npcId
= m_npcMod.CreateNPC(
"John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, new AvatarAppearance());

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
// private static readonly ILog m_log =
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
private IAssetService m_AssetService;
private bool m_Enabled = true;
@@ -64,7 +64,7 @@ namespace OpenSim.Region.ClientStack.Linden
private string m_URL2;
private string m_RedirectURL = null;
private string m_RedirectURL2 = null;
struct aPollRequest
{
public PollServiceMeshEventArgs thepoll;
@@ -132,7 +132,7 @@ namespace OpenSim.Region.ClientStack.Linden
return;
m_scene = pScene;
m_assetService = pScene.AssetService;
}
@@ -342,7 +342,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
string capUrl = "/CAPS/" + UUID.Random() + "/";
// Register this as a poll service
// Register this as a poll service
PollServiceMeshEventArgs args = new PollServiceMeshEventArgs(capUrl, agentID, m_scene);
args.Type = PollServiceEventArgs.EventType.Mesh;
@@ -394,7 +394,7 @@ namespace OpenSim.Region.ClientStack.Linden
private readonly Scene m_scene;
private ThrottleOutPacketType Throttle;
private readonly UUID User;
public MeshCapsDataThrottler(int pBytes, int max, int min, Scene pScene, UUID puser)
{
ThrottleBytes = pBytes;
@@ -422,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden
// Normal
if (BytesSent <= ThrottleBytes)
{
BytesSent += response.bytes;
BytesSent += response.bytes;
return true;
}
else
@@ -432,7 +432,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
return haskey;
}
public void ProcessTime()
{
PassTime();

View File

@@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.Linden
new OpenMetaverse.BlockingQueue<aPollRequest>();
private Dictionary<UUID,PollServiceTextureEventArgs> m_pollservices = new Dictionary<UUID,PollServiceTextureEventArgs>();
private string m_Url = "localhost";
#region ISharedRegionModule Members
@@ -148,7 +148,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
private int ExtractImageThrottle(byte[] pthrottles)
{
byte[] adjData;
int pos = 0;
@@ -195,10 +195,10 @@ namespace OpenSim.Region.ClientStack.Linden
if(m_NumberScenes <= 0 && m_workerThreads != null)
{
m_log.DebugFormat("[GetTextureModule] Closing");
foreach (Thread t in m_workerThreads)
Watchdog.AbortThread(t.ManagedThreadId);
m_queue.Clear();
}
}
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.Linden
private Scene m_scene;
private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000);
public PollServiceTextureEventArgs(UUID pId, Scene scene) :
base(null, "", null, null, null, pId, int.MaxValue)
base(null, "", null, null, null, pId, int.MaxValue)
{
m_scene = scene;
// x is request id, y is userid
@@ -258,7 +258,7 @@ namespace OpenSim.Region.ClientStack.Linden
reqinfo.reqID = x;
reqinfo.request = y;
reqinfo.send503 = false;
lock (responses)
{
if (responses.Count > 0)
@@ -317,7 +317,7 @@ namespace OpenSim.Region.ClientStack.Linden
Hashtable headers = new Hashtable();
headers["Retry-After"] = 30;
response["headers"] = headers;
lock (responses)
responses[requestID] = new aPollResponse() {bytes = 0, response = response};
@@ -334,13 +334,13 @@ namespace OpenSim.Region.ClientStack.Linden
response["content_type"] = "text/plain";
response["keepalive"] = false;
response["reusecontext"] = false;
lock (responses)
responses[requestID] = new aPollResponse() {bytes = 0, response = response};
return;
}
response = m_getTextureHandler.Handle(requestinfo.request);
lock (responses)
{
@@ -349,8 +349,8 @@ namespace OpenSim.Region.ClientStack.Linden
bytes = (int) response["int_bytes"],
response = response
};
}
}
m_throttler.ProcessTime();
}
@@ -368,16 +368,16 @@ namespace OpenSim.Region.ClientStack.Linden
{
string capUrl = "/CAPS/" + UUID.Random() + "/";
// Register this as a poll service
// Register this as a poll service
PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene);
args.Type = PollServiceEventArgs.EventType.Texture;
MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
string hostName = m_scene.RegionInfo.ExternalHostName;
uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
string protocol = "http";
if (MainServer.Instance.UseSSL)
{
hostName = MainServer.Instance.SSLCommonName;
@@ -484,5 +484,5 @@ namespace OpenSim.Region.ClientStack.Linden
}
public int ThrottleBytes;
}
}
}
}

View File

@@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.Linden
// data["username"] = sp.Firstname + "." + sp.Lastname;
// data["display_name_next_update"] = new OSDDate(DateTime.Now);
// data["legacy_first_name"] = sp.Firstname;
data["mesh_upload_status"] = "valid";
data["mesh_upload_status"] = "valid";
// data["display_name"] = sp.Firstname + " " + sp.Lastname;
// data["legacy_last_name"] = sp.Lastname;
// data["id"] = m_agentID;
@@ -141,7 +141,7 @@ namespace OpenSim.Region.ClientStack.Linden
//Send back data
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 200;
responsedata["int_response_code"] = 200;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data);

View File

@@ -47,7 +47,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
// private static readonly ILog m_log =
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
#region INonSharedRegionModule Members
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
public void Close()
{
{
}
public string Name

View File

@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden
if (i == 0)
{
rootpos = obj.Position;
// rootrot = obj.Rotation;
// rootrot = obj.Rotation;
}
// Combine the extraparams data into it's ugly blob again....
@@ -321,7 +321,7 @@ namespace OpenSim.Region.ClientStack.Linden
pbs.TextureEntry = tmp.GetBytes();
prim.Shape = pbs;
prim.Scale = obj.Scale;
SceneObjectGroup grp = new SceneObjectGroup();
grp.SetRootPart(prim);
@@ -329,21 +329,21 @@ namespace OpenSim.Region.ClientStack.Linden
if (i == 0)
{
rootGroup = grp;
}
grp.AttachToScene(m_scene);
grp.AbsolutePosition = obj.Position;
prim.RotationOffset = obj.Rotation;
// Required for linking
grp.RootPart.ClearUpdateSchedule();
if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
{
m_scene.AddSceneObject(grp);
grp.AbsolutePosition = obj.Position;
}
allparts[i] = grp;
}
@@ -359,7 +359,7 @@ namespace OpenSim.Region.ClientStack.Linden
pos
= m_scene.GetNewRezLocation(
Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false);
responsedata["int_response_code"] = 200; //501; //410; //404;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;
@@ -367,7 +367,7 @@ namespace OpenSim.Region.ClientStack.Linden
return responsedata;
}
private string ConvertUintToBytes(uint val)
{
byte[] resultbytes = Utils.UIntToBytes(val);

View File

@@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenCaps")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//

View File

@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
// private static readonly ILog m_log =
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene;
private IEventQueue m_eventQueue;
private Commands m_commands = new Commands();
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ClientStack.Linden
SendConsoleOutput(agentID, reply);
}
public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn)
{
m_commands.AddCommand(module, shared, command, help, longhelp, fn);

View File

@@ -50,7 +50,7 @@ namespace OpenSim.Region.ClientStack.Linden
/// This is required for uploading Mesh.
/// Since is accepts an open-ended response, we also send more information
/// for viewers that care to interpret it.
///
///
/// NOTE: Part of this code was adapted from the Aurora project, specifically
/// the normal part of the response in the capability handler.
/// </remarks>
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ClientStack.Linden
IConfig config = source.Configs["SimulatorFeatures"];
if (config != null)
{
{
//
// All this is obsolete since getting these features from the grid service!!
// Will be removed after the next release
@@ -251,7 +251,7 @@ namespace OpenSim.Region.ClientStack.Linden
//Send back data
Hashtable responsedata = new Hashtable();
responsedata["int_response_code"] = 200;
responsedata["int_response_code"] = 200;
responsedata["content_type"] = "text/plain";
responsedata["keepalive"] = false;

View File

@@ -151,7 +151,7 @@ namespace OpenSim.Region.ClientStack.Linden.Caps.Tests
OSDMap responseOsd = (OSDMap)OSDParser.DeserializeLLSDXml(context.ResponseBody);
OSDArray foldersOsd = (OSDArray)responseOsd["folders"];
OSDMap folderOsd = (OSDMap)foldersOsd[0];
// A sanity check that the response has the expected number of descendents for a default inventory
// TODO: Need a more thorough check.
Assert.That((int)folderOsd["descendents"], Is.EqualTo(16));

View File

@@ -84,7 +84,7 @@ namespace OpenSim.Region.ClientStack.Linden
public void AddRegion(Scene s)
{
m_scene = s;
}
public void RemoveRegion(Scene s)
@@ -94,14 +94,14 @@ namespace OpenSim.Region.ClientStack.Linden
s.EventManager.OnRemovePresence -= DeRegisterPresence;
m_BakedTextureModule = null;
m_scene = null;
}
}
public void RegionLoaded(Scene s)
{
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
m_scene.EventManager.OnNewPresence += RegisterNewPresence;
m_scene.EventManager.OnRemovePresence += DeRegisterPresence;
}
private void DeRegisterPresence(UUID agentId)
@@ -205,7 +205,7 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
else
{
{
for (int i = 0; i < maxCacheitemsLoop; i++)
{
if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex)
@@ -285,7 +285,7 @@ namespace OpenSim.Region.ClientStack.Linden
avatarhandler.UploadBakedTexture,
"UploadBakedTexture",
agentID.ToString()));
}
else
{

View File

@@ -456,7 +456,7 @@ namespace OpenSim.Region.ClientStack.Linden
catch (Exception e)
{
m_log.ErrorFormat(
"[INVENTORY]: Failed to process queued inventory request {0} for {1}. Exception {3}",
"[INVENTORY]: Failed to process queued inventory request {0} for {1}. Exception {3}",
poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", e);
}
}