mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Formatting cleanup, minor refactoring, svn properties.
This commit is contained in:
@@ -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<IGridPlugin> m_plugins = new List<IGridPlugin>();
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) ||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user