Add copyright header. Formatting cleanup. Ignore some generated files.
parent
6ae88d129a
commit
8ea12ad6c0
|
@ -245,7 +245,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
|
||||||
|
|
||||||
m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
|
m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
|
||||||
m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
|
m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
|
||||||
if(m_openSim.userStatsURI != String.Empty )
|
if (m_openSim.userStatsURI != String.Empty )
|
||||||
m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim));
|
m_httpServer.AddStreamHandler(new OpenSim.UXSimStatusHandler(m_openSim));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -413,9 +413,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
private bool getBoolean(Hashtable requestData, string tag, bool defv)
|
private bool getBoolean(Hashtable requestData, string tag, bool defv)
|
||||||
{
|
{
|
||||||
// If an access value has been provided, apply it.
|
// If an access value has been provided, apply it.
|
||||||
if(requestData.Contains(tag))
|
if (requestData.Contains(tag))
|
||||||
{
|
{
|
||||||
switch(((string)requestData[tag]).ToLower())
|
switch (((string)requestData[tag]).ToLower())
|
||||||
{
|
{
|
||||||
case "true" :
|
case "true" :
|
||||||
case "t" :
|
case "t" :
|
||||||
|
@ -670,7 +670,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
List<ILandObject> parcels = ((Scene)newscene).LandChannel.AllParcels();
|
List<ILandObject> parcels = ((Scene)newscene).LandChannel.AllParcels();
|
||||||
|
|
||||||
foreach(ILandObject parcel in parcels)
|
foreach (ILandObject parcel in parcels)
|
||||||
{
|
{
|
||||||
parcel.landData.Flags |= (uint) Parcel.ParcelFlags.AllowVoiceChat;
|
parcel.landData.Flags |= (uint) Parcel.ParcelFlags.AllowVoiceChat;
|
||||||
parcel.landData.Flags |= (uint) Parcel.ParcelFlags.UseEstateVoiceChan;
|
parcel.landData.Flags |= (uint) Parcel.ParcelFlags.UseEstateVoiceChan;
|
||||||
|
@ -826,7 +826,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
bool enableVoice = getBoolean(requestData, "enable_voice", true);
|
bool enableVoice = getBoolean(requestData, "enable_voice", true);
|
||||||
List<ILandObject> parcels = ((Scene)scene).LandChannel.AllParcels();
|
List<ILandObject> parcels = ((Scene)scene).LandChannel.AllParcels();
|
||||||
|
|
||||||
foreach(ILandObject parcel in parcels)
|
foreach (ILandObject parcel in parcels)
|
||||||
{
|
{
|
||||||
if (enableVoice)
|
if (enableVoice)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
m_creatorId = value;
|
m_creatorId = value;
|
||||||
UUID creatorIdAsUuid;
|
UUID creatorIdAsUuid;
|
||||||
|
|
||||||
// For now, all IDs are UUIDs
|
// For now, all IDs are UUIDs
|
||||||
UUID.TryParse(m_creatorId, out creatorIdAsUuid);
|
UUID.TryParse(m_creatorId, out creatorIdAsUuid);
|
||||||
CreatorIdAsUuid = creatorIdAsUuid;
|
CreatorIdAsUuid = creatorIdAsUuid;
|
||||||
|
@ -63,7 +63,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
private string m_creatorId = String.Empty;
|
private string m_creatorId = String.Empty;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The creator of this item expressed as a UUID
|
/// The creator of this item expressed as a UUID
|
||||||
/// </value>
|
/// </value>
|
||||||
|
@ -105,7 +105,7 @@ namespace OpenSim.Framework
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
public uint EveryOnePermissions;
|
public uint EveryOnePermissions;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
|
@ -150,10 +150,10 @@ namespace OpenSim.Framework
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
public int CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
public int CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
return MemberwiseClone();
|
return MemberwiseClone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public static T GetDataBlock<T>() where T: new()
|
public static T GetDataBlock<T>() where T: new()
|
||||||
{
|
{
|
||||||
lock(DataBlocks)
|
lock (DataBlocks)
|
||||||
{
|
{
|
||||||
if (DataBlocks.ContainsKey(typeof(T)) && DataBlocks[typeof(T)].Count > 0)
|
if (DataBlocks.ContainsKey(typeof(T)) && DataBlocks[typeof(T)].Count > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,13 +36,13 @@ using System.Reflection;
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// We use this class to store image data and associated request data and attributes
|
/// We use this class to store image data and associated request data and attributes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class J2KImage
|
public class J2KImage
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public double m_designatedPriorityKey;
|
public double m_designatedPriorityKey;
|
||||||
public double m_requestedPriority = 0.0d;
|
public double m_requestedPriority = 0.0d;
|
||||||
public uint m_lastSequence = 0;
|
public uint m_lastSequence = 0;
|
||||||
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public AssetBase m_MissingSubstitute = null;
|
public AssetBase m_MissingSubstitute = null;
|
||||||
public bool m_decoded = false;
|
public bool m_decoded = false;
|
||||||
public bool m_completedSendAtCurrentDiscardLevel;
|
public bool m_completedSendAtCurrentDiscardLevel;
|
||||||
|
|
||||||
private sbyte m_discardLevel=-1;
|
private sbyte m_discardLevel=-1;
|
||||||
private uint m_packetNumber;
|
private uint m_packetNumber;
|
||||||
private bool m_decoderequested = false;
|
private bool m_decoderequested = false;
|
||||||
|
@ -135,6 +135,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1;
|
return ((bytePosition - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int LastPacketSize()
|
public int LastPacketSize()
|
||||||
{
|
{
|
||||||
if (m_packetNumber == 1)
|
if (m_packetNumber == 1)
|
||||||
|
@ -146,8 +147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
lastsize = cImagePacketSize;
|
lastsize = cImagePacketSize;
|
||||||
}
|
}
|
||||||
return lastsize;
|
return lastsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int CurrentBytePosition()
|
public int CurrentBytePosition()
|
||||||
{
|
{
|
||||||
|
@ -215,7 +215,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
complete = true;
|
complete = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// It's concievable that the client might request packet one
|
// It's concievable that the client might request packet one
|
||||||
// from a one packet image, which is really packet 0,
|
// from a one packet image, which is really packet 0,
|
||||||
// which would leave us with a negative imagePacketSize..
|
// which would leave us with a negative imagePacketSize..
|
||||||
|
@ -234,7 +234,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
//Send the packet
|
//Send the packet
|
||||||
client.SendImageNextPart((ushort)(m_packetNumber-1), m_requestedUUID, imageData);
|
client.SendImageNextPart((ushort)(m_packetNumber-1), m_requestedUUID, imageData);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (complete)
|
if (complete)
|
||||||
{
|
{
|
||||||
|
@ -257,7 +256,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (m_packetNumber <= m_stopPacket)
|
if (m_packetNumber <= m_stopPacket)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool SendMore = true;
|
bool SendMore = true;
|
||||||
if (!m_sentinfo || (m_packetNumber == 0))
|
if (!m_sentinfo || (m_packetNumber == 0))
|
||||||
{
|
{
|
||||||
|
@ -273,8 +271,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
m_packetNumber = 2;
|
m_packetNumber = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int count=0;
|
int count = 0;
|
||||||
while (SendMore && count < 5 && m_packetNumber <= m_stopPacket)
|
while (SendMore && count < 5 && m_packetNumber <= m_stopPacket)
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
|
@ -284,13 +282,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (m_packetNumber > m_stopPacket)
|
if (m_packetNumber > m_stopPacket)
|
||||||
{
|
{
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -343,12 +337,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//discardLevel of -1 means just update the priority
|
//discardLevel of -1 means just update the priority
|
||||||
if (m_requestedDiscardLevel != -1)
|
if (m_requestedDiscardLevel != -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Evaluate the discard level
|
//Evaluate the discard level
|
||||||
//First, is it positive?
|
//First, is it positive?
|
||||||
if (m_requestedDiscardLevel >= 0)
|
if (m_requestedDiscardLevel >= 0)
|
||||||
|
@ -361,7 +352,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
m_discardLevel = m_requestedDiscardLevel;
|
m_discardLevel = m_requestedDiscardLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Calculate the m_stopPacket
|
//Calculate the m_stopPacket
|
||||||
if (Layers.Length > 0)
|
if (Layers.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -382,18 +373,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
m_packetNumber = m_requestedPacketNumber;
|
m_packetNumber = m_requestedPacketNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_packetNumber <= m_stopPacket)
|
if (m_packetNumber <= m_stopPacket)
|
||||||
{
|
{
|
||||||
m_completedSendAtCurrentDiscardLevel = false;
|
m_completedSendAtCurrentDiscardLevel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void Cancel(uint sequence)
|
public void Cancel(uint sequence)
|
||||||
{
|
{
|
||||||
while(contents.Remove(sequence))
|
while (contents.Remove(sequence))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
public class InventoryArchiveWriteRequest
|
public class InventoryArchiveWriteRequest
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Used to select all inventory nodes in a folder but not the folder itself
|
/// Used to select all inventory nodes in a folder but not the folder itself
|
||||||
/// </value>
|
/// </value>
|
||||||
|
@ -58,12 +58,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
private string m_invPath;
|
private string m_invPath;
|
||||||
protected TarArchiveWriter m_archive;
|
protected TarArchiveWriter m_archive;
|
||||||
protected UuidGatherer m_assetGatherer;
|
protected UuidGatherer m_assetGatherer;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Used to collect the uuids of the assets that we need to save into the archive
|
/// Used to collect the uuids of the assets that we need to save into the archive
|
||||||
/// </value>
|
/// </value>
|
||||||
protected Dictionary<UUID, int> m_assetUuids = new Dictionary<UUID, int>();
|
protected Dictionary<UUID, int> m_assetUuids = new Dictionary<UUID, int>();
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Used to collect the uuids of the users that we need to save into the archive
|
/// Used to collect the uuids of the users that we need to save into the archive
|
||||||
/// </value>
|
/// </value>
|
||||||
|
@ -125,16 +125,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
protected void SaveInvItem(InventoryItemBase inventoryItem, string path)
|
protected void SaveInvItem(InventoryItemBase inventoryItem, string path)
|
||||||
{
|
{
|
||||||
string filename = string.Format("{0}{1}_{2}.xml", path, inventoryItem.Name, inventoryItem.ID);
|
string filename = string.Format("{0}{1}_{2}.xml", path, inventoryItem.Name, inventoryItem.ID);
|
||||||
|
|
||||||
// Record the creator of this item for user record purposes (which might go away soon)
|
// Record the creator of this item for user record purposes (which might go away soon)
|
||||||
m_userUuids[inventoryItem.CreatorIdAsUuid] = 1;
|
m_userUuids[inventoryItem.CreatorIdAsUuid] = 1;
|
||||||
|
|
||||||
InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone();
|
InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone();
|
||||||
saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_module.CommsManager);
|
saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_module.CommsManager);
|
||||||
|
|
||||||
string serialization = UserInventoryItemSerializer.Serialize(saveItem);
|
string serialization = UserInventoryItemSerializer.Serialize(saveItem);
|
||||||
m_archive.WriteFile(filename, serialization);
|
m_archive.WriteFile(filename, serialization);
|
||||||
|
|
||||||
m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType)saveItem.AssetType, m_assetUuids);
|
m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType)saveItem.AssetType, m_assetUuids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
inventoryFolder.Name,
|
inventoryFolder.Name,
|
||||||
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
|
ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
|
||||||
inventoryFolder.ID);
|
inventoryFolder.ID);
|
||||||
|
|
||||||
// We need to make sure that we record empty folders
|
// We need to make sure that we record empty folders
|
||||||
m_archive.WriteDir(path);
|
m_archive.WriteDir(path);
|
||||||
}
|
}
|
||||||
|
@ -225,12 +225,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
}
|
}
|
||||||
|
|
||||||
bool foundStar = false;
|
bool foundStar = false;
|
||||||
|
|
||||||
// Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl
|
// Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl
|
||||||
// itself (possibly at a small loss in efficiency).
|
// itself (possibly at a small loss in efficiency).
|
||||||
string[] components
|
string[] components
|
||||||
= m_invPath.Split(new string[] { InventoryFolderImpl.PATH_DELIMITER }, StringSplitOptions.RemoveEmptyEntries);
|
= m_invPath.Split(new string[] { InventoryFolderImpl.PATH_DELIMITER }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
int maxComponentIndex = components.Length - 1;
|
int maxComponentIndex = components.Length - 1;
|
||||||
|
|
||||||
// If the path terminates with a STAR then later on we want to archive all nodes in the folder but not the
|
// If the path terminates with a STAR then later on we want to archive all nodes in the folder but not the
|
||||||
|
@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
foundStar = true;
|
foundStar = true;
|
||||||
maxComponentIndex--;
|
maxComponentIndex--;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_invPath = String.Empty;
|
m_invPath = String.Empty;
|
||||||
for (int i = 0; i <= maxComponentIndex; i++)
|
for (int i = 0; i <= maxComponentIndex; i++)
|
||||||
{
|
{
|
||||||
|
@ -296,24 +296,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
//recurse through all dirs getting dirs and files
|
//recurse through all dirs getting dirs and files
|
||||||
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar);
|
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveUsers();
|
SaveUsers();
|
||||||
new AssetsRequest(m_assetUuids.Keys, m_module.CommsManager.AssetCache, ReceivedAllAssets).Execute();
|
new AssetsRequest(m_assetUuids.Keys, m_module.CommsManager.AssetCache, ReceivedAllAssets).Execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save information for the users that we've collected.
|
/// Save information for the users that we've collected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void SaveUsers()
|
protected void SaveUsers()
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving user information for {0} users", m_userUuids.Count);
|
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving user information for {0} users", m_userUuids.Count);
|
||||||
|
|
||||||
foreach (UUID creatorId in m_userUuids.Keys)
|
foreach (UUID creatorId in m_userUuids.Keys)
|
||||||
{
|
{
|
||||||
// Record the creator of this item
|
// Record the creator of this item
|
||||||
CachedUserInfo creator
|
CachedUserInfo creator
|
||||||
= m_module.CommsManager.UserProfileCacheService.GetUserDetails(creatorId);
|
= m_module.CommsManager.UserProfileCacheService.GetUserDetails(creatorId);
|
||||||
|
|
||||||
if (creator != null)
|
if (creator != null)
|
||||||
{
|
{
|
||||||
m_archive.WriteFile(
|
m_archive.WriteFile(
|
||||||
|
|
|
@ -1861,7 +1861,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
bool welcome = true;
|
bool welcome = true;
|
||||||
|
|
||||||
if(m_regInfo.EstateSettings.IsBanned(client.AgentId) && (!Permissions.IsGod(client.AgentId)))
|
if (m_regInfo.EstateSettings.IsBanned(client.AgentId) && (!Permissions.IsGod(client.AgentId)))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
|
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
|
||||||
client.AgentId, client.FirstName, client.LastName, RegionInfo.RegionName);
|
client.AgentId, client.FirstName, client.LastName, RegionInfo.RegionName);
|
||||||
|
@ -1876,7 +1876,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
welcome = false;
|
welcome = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!welcome)
|
if (!welcome)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1899,46 +1899,46 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SubscribeToClientEvents(client);
|
SubscribeToClientEvents(client);
|
||||||
ScenePresence presence;
|
ScenePresence presence;
|
||||||
|
|
||||||
if (m_restorePresences.ContainsKey(client.AgentId))
|
if (m_restorePresences.ContainsKey(client.AgentId))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[SCENE]: Restoring agent {0} {1} in {2}", client.Name, client.AgentId, RegionInfo.RegionName);
|
m_log.DebugFormat("[SCENE]: Restoring agent {0} {1} in {2}", client.Name, client.AgentId, RegionInfo.RegionName);
|
||||||
|
|
||||||
presence = m_restorePresences[client.AgentId];
|
presence = m_restorePresences[client.AgentId];
|
||||||
m_restorePresences.Remove(client.AgentId);
|
m_restorePresences.Remove(client.AgentId);
|
||||||
|
|
||||||
// This is one of two paths to create avatars that are
|
// This is one of two paths to create avatars that are
|
||||||
// used. This tends to get called more in standalone
|
// used. This tends to get called more in standalone
|
||||||
// than grid, not really sure why, but as such needs
|
// than grid, not really sure why, but as such needs
|
||||||
// an explicity appearance lookup here.
|
// an explicity appearance lookup here.
|
||||||
AvatarAppearance appearance = null;
|
AvatarAppearance appearance = null;
|
||||||
GetAvatarAppearance(client, out appearance);
|
GetAvatarAppearance(client, out appearance);
|
||||||
presence.Appearance = appearance;
|
presence.Appearance = appearance;
|
||||||
|
|
||||||
presence.initializeScenePresence(client, RegionInfo, this);
|
presence.initializeScenePresence(client, RegionInfo, this);
|
||||||
|
|
||||||
m_sceneGraph.AddScenePresence(presence);
|
m_sceneGraph.AddScenePresence(presence);
|
||||||
|
|
||||||
lock (m_restorePresences)
|
lock (m_restorePresences)
|
||||||
{
|
{
|
||||||
Monitor.PulseAll(m_restorePresences);
|
Monitor.PulseAll(m_restorePresences);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE]: Adding new child agent for {0} in {1}",
|
"[SCENE]: Adding new child agent for {0} in {1}",
|
||||||
client.Name, RegionInfo.RegionName);
|
client.Name, RegionInfo.RegionName);
|
||||||
|
|
||||||
CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
|
CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
|
||||||
|
|
||||||
CreateAndAddScenePresence(client);
|
CreateAndAddScenePresence(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_LastLogin = Environment.TickCount;
|
m_LastLogin = Environment.TickCount;
|
||||||
EventManager.TriggerOnNewClient(client);
|
EventManager.TriggerOnNewClient(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace OpenSim.Services.Interfaces
|
namespace OpenSim.Services.Interfaces
|
||||||
{
|
{
|
||||||
public interface IUserService
|
public interface IUserService
|
||||||
|
|
Loading…
Reference in New Issue