From 4ec4e16c809cf86a63b736d2b7b6ad7291595a5f Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 4 Jun 2008 09:59:27 +0000 Subject: Formatting cleanup, minor refactoring, svn properties. --- OpenSim/Grid/GridServer/GridServerBase.cs | 14 ++++++------ OpenSim/Grid/MessagingServer/MessageService.cs | 26 +++++++++++----------- OpenSim/Grid/MessagingServer/PresenceInformer.cs | 16 ++++++------- OpenSim/Grid/MessagingServer/UserManager.cs | 8 +++---- .../Compiler/Server_API/LSL_BuiltIn_Commands.cs | 6 ++--- OpenSim/Grid/UserServer/UserManager.cs | 8 +++---- 6 files changed, 39 insertions(+), 39 deletions(-) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 8ca4296..7891c29 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -43,7 +43,7 @@ namespace OpenSim.Grid.GridServer public class GridServerBase : BaseOpenSimServer, conscmd_callback { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + protected GridConfig m_config; protected GridManager m_gridManager; protected List m_plugins = new List(); @@ -121,12 +121,12 @@ namespace OpenSim.Grid.GridServer // Temporary hack to stop mono-addins scanning warnings from coming out on the console TextWriter oldOutput = Console.Out; Console.SetOut(new StreamWriter(Stream.Null)); - + AddinManager.Initialize("."); AddinManager.Registry.Update(null); - + // Returns the console.writelines back to the console's stream - Console.SetOut(oldOutput); + Console.SetOut(oldOutput); ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer"); foreach (TypeExtensionNode node in nodes) @@ -175,7 +175,7 @@ namespace OpenSim.Grid.GridServer catch { } - + if (SimResponse == "OK") { m_simProfileManager.SimProfiles[sim.UUID].online = true; @@ -187,11 +187,11 @@ namespace OpenSim.Grid.GridServer } */ } - + public override void Shutdown() { foreach (IGridPlugin plugin in m_plugins) plugin.Close(); - + base.Shutdown(); } } diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 0abb89d..cec596f 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs @@ -67,12 +67,12 @@ namespace OpenSim.Grid.MessagingServer UserConfig uc = new UserConfig(); uc.DatabaseConnect = cfg.DatabaseConnect; uc.DatabaseProvider = cfg.DatabaseProvider; - + m_userManager._config = uc; m_userManager.AddPlugin(cfg.DatabaseProvider, cfg.DatabaseConnect); } - + #region FriendList Methods @@ -152,7 +152,7 @@ namespace OpenSim.Grid.MessagingServer friendlistupdater.OnDone += PresenceUpdateDone; WaitCallback cb = new WaitCallback(friendlistupdater.go); ThreadPool.QueueUserWorkItem(cb); - + } else { @@ -173,7 +173,7 @@ namespace OpenSim.Grid.MessagingServer { // we need to send out online status update, but the user is already subscribed } - + UserAgentData p2Handle = m_userManager.GetUserAgentData(friendpresence.agentData.AgentID); if (p2Handle != null) @@ -196,7 +196,7 @@ namespace OpenSim.Grid.MessagingServer // skip, agent doesn't appear to exist anymore } - + //SendRegionPresenceUpdate(userpresence, friendpresence); } @@ -315,8 +315,8 @@ namespace OpenSim.Grid.MessagingServer UserAgentData p2Handle = m_userManager.GetUserAgentData(friendd.agentData.AgentID); if (p2Handle != null) { - - + + friendd.regionData.regionHandle = p2Handle.Handle; PresenceInformer friendlistupdater = new PresenceInformer(); friendlistupdater.presence1 = AgentData; @@ -328,11 +328,11 @@ namespace OpenSim.Grid.MessagingServer friendlistupdater.OnGetRegionData += GetRegionInfo; friendlistupdater.OnDone += PresenceUpdateDone; - + WaitCallback cb3 = new WaitCallback(friendlistupdater.go); ThreadPool.QueueUserWorkItem(cb3); - + } else @@ -519,14 +519,14 @@ namespace OpenSim.Grid.MessagingServer else { // Don't lock the cache while we're looking up the region! - lookup = true; + lookup = true; } } if (lookup) { regionInfo = RequestRegionInfo(regionhandle); - + if (regionInfo != null) { lock (m_regionInfoCache) @@ -542,7 +542,7 @@ namespace OpenSim.Grid.MessagingServer } } } - + return regionInfo; } @@ -555,7 +555,7 @@ namespace OpenSim.Grid.MessagingServer cachecount = m_regionInfoCache.Count; m_regionInfoCache.Clear(); } - + return cachecount; } diff --git a/OpenSim/Grid/MessagingServer/PresenceInformer.cs b/OpenSim/Grid/MessagingServer/PresenceInformer.cs index 3e35f20..e02aa06 100644 --- a/OpenSim/Grid/MessagingServer/PresenceInformer.cs +++ b/OpenSim/Grid/MessagingServer/PresenceInformer.cs @@ -36,13 +36,13 @@ namespace OpenSim.Grid.MessagingServer { public delegate RegionProfileData GetRegionData(ulong region_handle); public delegate void Done(PresenceInformer obj); - + public class PresenceInformer { public event GetRegionData OnGetRegionData; public event Done OnDone; - + private GetRegionData handlerGetRegionData = null; private Done handlerDone = null; @@ -102,10 +102,10 @@ namespace OpenSim.Grid.MessagingServer PresenceParams.Add("notify_id",UserToUpdate.agentData.AgentID.ToString()); if (TalkingAbout.OnlineYN) PresenceParams.Add("status","TRUE"); - else + else PresenceParams.Add("status","FALSE"); - + ArrayList SendParams = new ArrayList(); @@ -123,12 +123,12 @@ namespace OpenSim.Grid.MessagingServer catch (WebException) { m_log.WarnFormat("[INFORM]: failed notifying region {0} containing user {1} about {2}", whichRegion.regionName, UserToUpdate.agentData.firstname + " " + UserToUpdate.agentData.lastname, TalkingAbout.agentData.firstname + " " + TalkingAbout.agentData.lastname); - } - } - else + } + } + else { m_log.Info("[PRESENCEUPDATER]: Region data was null skipping"); - + } handlerDone = OnDone; diff --git a/OpenSim/Grid/MessagingServer/UserManager.cs b/OpenSim/Grid/MessagingServer/UserManager.cs index 605c3fb..de41756 100644 --- a/OpenSim/Grid/MessagingServer/UserManager.cs +++ b/OpenSim/Grid/MessagingServer/UserManager.cs @@ -44,7 +44,7 @@ namespace OpenSim.Grid.MessagingServer public UserAgentData GetUserAgentData(LLUUID AgentID) { UserProfileData userProfile = GetUserProfile(AgentID); - + if (userProfile != null) { return userProfile.CurrentAgent; @@ -58,19 +58,19 @@ namespace OpenSim.Grid.MessagingServer public override UserProfileData SetupMasterUser(string firstName, string lastName) { //throw new Exception("The method or operation is not implemented."); - return null; + return null; } public override UserProfileData SetupMasterUser(string firstName, string lastName, string password) { //throw new Exception("The method or operation is not implemented."); - return null; + return null; } public override UserProfileData SetupMasterUser(LLUUID uuid) { //throw new Exception("The method or operation is not implemented."); - return null; + return null; } } } diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index ad1b989..9cd3fb1 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -224,14 +224,14 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler LSL_Types.Quaternion a2 = new LSL_Types.Quaternion(0.0, by, 0.0, bw); LSL_Types.Quaternion a3 = new LSL_Types.Quaternion(ax, 0.0, 0.0, aw); LSL_Types.Quaternion a = new LSL_Types.Quaternion(); - //This multiplication doesnt compile, yet. a = a1 * a2 * a3; + //This multiplication doesn't compile, yet. a = a1 * a2 * a3; LSL_Types.Quaternion b = new LSL_Types.Quaternion(ax*bw*cw + aw*by*cz, aw*by*cw - ax*bw*cz, aw*bw*cz + ax*by*cw, aw*bw*cw - ax*by*cz); LSL_Types.Quaternion c = new LSL_Types.Quaternion(); - //This addition doesnt compile yet c = a + b; + //This addition doesn't compile yet c = a + b; LSL_Types.Quaternion d = new LSL_Types.Quaternion(); - //This addition doesnt compile yet d = a - b; + //This addition doesn't compile yet d = a - b; if ((Math.Abs(c.X) > err && Math.Abs(d.X) > err) || (Math.Abs(c.Y) > err && Math.Abs(d.Y) > err) || (Math.Abs(c.Z) > err && Math.Abs(d.Z) > err) || diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index a78876c..907a530 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -430,9 +430,9 @@ namespace OpenSim.Grid.UserServer if (requestData.Contains("avatar_uuid")) { LLUUID guess = LLUUID.Zero; - + Helpers.TryParse((string)requestData["avatar_uuid"],out guess); - + if (guess == LLUUID.Zero) { return CreateUnknownUserErrorResponse(); @@ -444,7 +444,7 @@ namespace OpenSim.Grid.UserServer { return CreateUnknownUserErrorResponse(); } - + // no agent??? if (userProfile.CurrentAgent == null) { @@ -456,7 +456,7 @@ namespace OpenSim.Grid.UserServer responseData["session"]=userProfile.CurrentAgent.SessionID.ToString(); if (userProfile.CurrentAgent.AgentOnline) responseData["agent_online"]="TRUE"; - else + else responseData["agent_online"]="FALSE"; response.Value = responseData; -- cgit v1.1