Merge branch 'master' of git://opensimulator.org/git/opensim
commit
d342adaa87
|
@ -44,7 +44,6 @@ namespace OpenSim.Framework
|
||||||
public Vector3 Position;
|
public Vector3 Position;
|
||||||
public byte[] binaryBucket;
|
public byte[] binaryBucket;
|
||||||
|
|
||||||
|
|
||||||
public uint ParentEstateID;
|
public uint ParentEstateID;
|
||||||
public Guid RegionID;
|
public Guid RegionID;
|
||||||
public uint timestamp;
|
public uint timestamp;
|
||||||
|
@ -58,7 +57,7 @@ namespace OpenSim.Framework
|
||||||
string _fromAgentName, UUID _toAgentID,
|
string _fromAgentName, UUID _toAgentID,
|
||||||
byte _dialog, bool _fromGroup, string _message,
|
byte _dialog, bool _fromGroup, string _message,
|
||||||
UUID _imSessionID, bool _offline, Vector3 _position,
|
UUID _imSessionID, bool _offline, Vector3 _position,
|
||||||
byte[] _binaryBucket)
|
byte[] _binaryBucket, bool addTimestamp)
|
||||||
{
|
{
|
||||||
fromAgentID = _fromAgentID.Guid;
|
fromAgentID = _fromAgentID.Guid;
|
||||||
fromAgentName = _fromAgentName;
|
fromAgentName = _fromAgentName;
|
||||||
|
@ -79,7 +78,9 @@ namespace OpenSim.Framework
|
||||||
ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID;
|
ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID;
|
||||||
RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid;
|
RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid;
|
||||||
}
|
}
|
||||||
timestamp = (uint)Util.UnixTimeSinceEpoch();
|
|
||||||
|
if (addTimestamp)
|
||||||
|
timestamp = (uint)Util.UnixTimeSinceEpoch();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GridInstantMessage(IScene scene, UUID _fromAgentID,
|
public GridInstantMessage(IScene scene, UUID _fromAgentID,
|
||||||
|
@ -87,7 +88,7 @@ namespace OpenSim.Framework
|
||||||
string _message, bool _offline,
|
string _message, bool _offline,
|
||||||
Vector3 _position) : this(scene, _fromAgentID, _fromAgentName,
|
Vector3 _position) : this(scene, _fromAgentID, _fromAgentName,
|
||||||
_toAgentID, _dialog, false, _message,
|
_toAgentID, _dialog, false, _message,
|
||||||
_fromAgentID ^ _toAgentID, _offline, _position, new byte[0])
|
_fromAgentID ^ _toAgentID, _offline, _position, new byte[0], true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5862,7 +5862,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
msgpack.MessageBlock.ID,
|
msgpack.MessageBlock.ID,
|
||||||
msgpack.MessageBlock.Offline != 0 ? true : false,
|
msgpack.MessageBlock.Offline != 0 ? true : false,
|
||||||
msgpack.MessageBlock.Position,
|
msgpack.MessageBlock.Position,
|
||||||
msgpack.MessageBlock.BinaryBucket);
|
msgpack.MessageBlock.BinaryBucket,
|
||||||
|
true);
|
||||||
|
|
||||||
handlerInstantMessage(this, im);
|
handlerInstantMessage(this, im);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
client.FirstName+" "+client.LastName,
|
client.FirstName+" "+client.LastName,
|
||||||
destID, (byte)211, false,
|
destID, (byte)211, false,
|
||||||
String.Empty,
|
String.Empty,
|
||||||
transactionID, false, new Vector3(), new byte[0]),
|
transactionID, false, new Vector3(), new byte[0], true),
|
||||||
delegate(bool success) {} );
|
delegate(bool success) {} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,6 +297,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name>
|
||||||
|
// to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis
|
||||||
|
// of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously
|
||||||
|
// done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here.
|
||||||
else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
|
else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
|
||||||
{
|
{
|
||||||
UUID destinationFolderID = UUID.Zero;
|
UUID destinationFolderID = UUID.Zero;
|
||||||
|
@ -308,6 +313,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
|
|
||||||
if (destinationFolderID != UUID.Zero)
|
if (destinationFolderID != UUID.Zero)
|
||||||
{
|
{
|
||||||
|
InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
|
||||||
|
if (destinationFolder == null)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
|
||||||
|
client.Name, scene.Name, destinationFolderID);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
IInventoryService invService = scene.InventoryService;
|
IInventoryService invService = scene.InventoryService;
|
||||||
|
|
||||||
UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
|
UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
|
||||||
|
@ -315,9 +330,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
||||||
item = invService.GetItem(item);
|
item = invService.GetItem(item);
|
||||||
InventoryFolderBase folder = null;
|
InventoryFolderBase folder = null;
|
||||||
|
UUID? previousParentFolderID = null;
|
||||||
|
|
||||||
if (item != null) // It's an item
|
if (item != null) // It's an item
|
||||||
{
|
{
|
||||||
|
previousParentFolderID = item.Folder;
|
||||||
item.Folder = destinationFolderID;
|
item.Folder = destinationFolderID;
|
||||||
|
|
||||||
invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
|
invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
|
||||||
|
@ -330,10 +347,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
|
|
||||||
if (folder != null) // It's a folder
|
if (folder != null) // It's a folder
|
||||||
{
|
{
|
||||||
|
previousParentFolderID = folder.ParentID;
|
||||||
folder.ParentID = destinationFolderID;
|
folder.ParentID = destinationFolderID;
|
||||||
invService.MoveFolder(folder);
|
invService.MoveFolder(folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
|
||||||
|
if (previousParentFolderID != null)
|
||||||
|
{
|
||||||
|
InventoryFolderBase previousParentFolder
|
||||||
|
= new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
|
||||||
|
previousParentFolder = invService.GetFolder(previousParentFolder);
|
||||||
|
scene.SendInventoryUpdate(client, previousParentFolder, true, true);
|
||||||
|
|
||||||
|
scene.SendInventoryUpdate(client, destinationFolder, true, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (
|
else if (
|
||||||
|
@ -354,9 +383,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
|
||||||
item = invService.GetItem(item);
|
item = invService.GetItem(item);
|
||||||
InventoryFolderBase folder = null;
|
InventoryFolderBase folder = null;
|
||||||
|
UUID? previousParentFolderID = null;
|
||||||
|
|
||||||
if (item != null && trashFolder != null)
|
if (item != null && trashFolder != null)
|
||||||
{
|
{
|
||||||
|
previousParentFolderID = item.Folder;
|
||||||
item.Folder = trashFolder.ID;
|
item.Folder = trashFolder.ID;
|
||||||
|
|
||||||
// Diva comment: can't we just update this item???
|
// Diva comment: can't we just update this item???
|
||||||
|
@ -372,6 +403,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
|
|
||||||
if (folder != null & trashFolder != null)
|
if (folder != null & trashFolder != null)
|
||||||
{
|
{
|
||||||
|
previousParentFolderID = folder.ParentID;
|
||||||
folder.ParentID = trashFolder.ID;
|
folder.ParentID = trashFolder.ID;
|
||||||
invService.MoveFolder(folder);
|
invService.MoveFolder(folder);
|
||||||
}
|
}
|
||||||
|
@ -391,6 +423,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
client.SendAgentAlertMessage("Unable to delete "+
|
client.SendAgentAlertMessage("Unable to delete "+
|
||||||
"received inventory" + reason, false);
|
"received inventory" + reason, false);
|
||||||
}
|
}
|
||||||
|
// Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
|
||||||
|
else if (previousParentFolderID != null)
|
||||||
|
{
|
||||||
|
InventoryFolderBase previousParentFolder
|
||||||
|
= new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
|
||||||
|
previousParentFolder = invService.GetFolder(previousParentFolder);
|
||||||
|
scene.SendInventoryUpdate(client, previousParentFolder, true, true);
|
||||||
|
|
||||||
|
scene.SendInventoryUpdate(client, trashFolder, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
|
ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||||
client.FirstName+" "+client.LastName, targetid,
|
client.FirstName+" "+client.LastName, targetid,
|
||||||
(byte)InstantMessageDialog.RequestTeleport, false,
|
(byte)InstantMessageDialog.RequestTeleport, false,
|
||||||
message, sessionID, false, presence.AbsolutePosition,
|
message, sessionID, false, presence.AbsolutePosition,
|
||||||
new Byte[0]);
|
new Byte[0], true);
|
||||||
m.RegionID = client.Scene.RegionInfo.RegionID.Guid;
|
m.RegionID = client.Scene.RegionInfo.RegionID.Guid;
|
||||||
|
|
||||||
m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message);
|
m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message);
|
||||||
|
|
|
@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||||
client.FirstName+" "+client.LastName, targetid,
|
client.FirstName+" "+client.LastName, targetid,
|
||||||
(byte)InstantMessageDialog.RequestTeleport, false,
|
(byte)InstantMessageDialog.RequestTeleport, false,
|
||||||
message, dest, false, presence.AbsolutePosition,
|
message, dest, false, presence.AbsolutePosition,
|
||||||
new Byte[0]);
|
new Byte[0], true);
|
||||||
|
|
||||||
if (m_TransferModule != null)
|
if (m_TransferModule != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1068,6 +1068,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
Scene initiatingScene)
|
Scene initiatingScene)
|
||||||
{
|
{
|
||||||
Thread.Sleep(10000);
|
Thread.Sleep(10000);
|
||||||
|
|
||||||
IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>();
|
IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>();
|
||||||
if (im != null)
|
if (im != null)
|
||||||
{
|
{
|
||||||
|
@ -1080,11 +1081,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
(uint)(int)position.X,
|
(uint)(int)position.X,
|
||||||
(uint)(int)position.Y,
|
(uint)(int)position.Y,
|
||||||
(uint)(int)position.Z);
|
(uint)(int)position.Z);
|
||||||
GridInstantMessage m = new GridInstantMessage(initiatingScene, UUID.Zero,
|
|
||||||
"Region", agent.UUID,
|
GridInstantMessage m
|
||||||
(byte)InstantMessageDialog.GodLikeRequestTeleport, false,
|
= new GridInstantMessage(
|
||||||
"", gotoLocation, false, new Vector3(127, 0, 0),
|
initiatingScene,
|
||||||
new Byte[0]);
|
UUID.Zero,
|
||||||
|
"Region",
|
||||||
|
agent.UUID,
|
||||||
|
(byte)InstantMessageDialog.GodLikeRequestTeleport,
|
||||||
|
false,
|
||||||
|
"",
|
||||||
|
gotoLocation,
|
||||||
|
false,
|
||||||
|
new Vector3(127, 0, 0),
|
||||||
|
new Byte[0],
|
||||||
|
false);
|
||||||
|
|
||||||
im.SendInstantMessage(m, delegate(bool success)
|
im.SendInstantMessage(m, delegate(bool success)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Client Initiating Teleport sending IM success = {0}", success);
|
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Client Initiating Teleport sending IM success = {0}", success);
|
||||||
|
|
|
@ -1424,7 +1424,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return newFolderID;
|
return newFolderID;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendInventoryUpdate(IClientAPI client, InventoryFolderBase folder, bool fetchFolders, bool fetchItems)
|
public void SendInventoryUpdate(IClientAPI client, InventoryFolderBase folder, bool fetchFolders, bool fetchItems)
|
||||||
{
|
{
|
||||||
if (folder == null)
|
if (folder == null)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -148,7 +148,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
OnInstantMessage(this, new GridInstantMessage(m_scene,
|
OnInstantMessage(this, new GridInstantMessage(m_scene,
|
||||||
m_uuid, m_firstname + " " + m_lastname,
|
m_uuid, m_firstname + " " + m_lastname,
|
||||||
target, 0, false, message,
|
target, 0, false, message,
|
||||||
UUID.Zero, false, Position, new byte[0]));
|
UUID.Zero, false, Position, new byte[0], true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAgentOffline(UUID[] agentIDs)
|
public void SendAgentOffline(UUID[] agentIDs)
|
||||||
|
|
|
@ -3978,7 +3978,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
World.RegionInfo.RegionName+" "+
|
World.RegionInfo.RegionName+" "+
|
||||||
m_host.AbsolutePosition.ToString(),
|
m_host.AbsolutePosition.ToString(),
|
||||||
agentItem.ID, true, m_host.AbsolutePosition,
|
agentItem.ID, true, m_host.AbsolutePosition,
|
||||||
bucket);
|
bucket, true); // TODO: May actually send no timestamp
|
||||||
|
|
||||||
m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
|
m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
|
||||||
}
|
}
|
||||||
|
@ -6453,15 +6453,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
byte[] bucket = new byte[] { (byte)AssetType.Folder };
|
byte[] bucket = new byte[] { (byte)AssetType.Folder };
|
||||||
|
|
||||||
|
Vector3 pos = m_host.AbsolutePosition;
|
||||||
|
|
||||||
GridInstantMessage msg = new GridInstantMessage(World,
|
GridInstantMessage msg = new GridInstantMessage(World,
|
||||||
m_host.UUID, m_host.Name + ", an object owned by " +
|
m_host.OwnerID, m_host.Name, destID,
|
||||||
resolveName(m_host.OwnerID) + ",", destID,
|
|
||||||
(byte)InstantMessageDialog.TaskInventoryOffered,
|
(byte)InstantMessageDialog.TaskInventoryOffered,
|
||||||
false, category + "\n" + m_host.Name + " is located at " +
|
false, string.Format("'{0}'"),
|
||||||
World.RegionInfo.RegionName + " " +
|
// We won't go so far as to add a SLURL, but this is the format used by LL as of 2012-10-06
|
||||||
m_host.AbsolutePosition.ToString(),
|
// false, string.Format("'{0}' ( http://slurl.com/secondlife/{1}/{2}/{3}/{4} )", category, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z),
|
||||||
folderID, true, m_host.AbsolutePosition,
|
folderID, false, pos,
|
||||||
bucket);
|
bucket, false);
|
||||||
|
|
||||||
m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
|
m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace OpenSim.Region.UserStatistics
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User statistics sessions keyed by agent ID
|
/// User statistics sessions keyed by agent ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Dictionary<UUID, UserSessionID> m_sessions = new Dictionary<UUID, UserSessionID>();
|
private Dictionary<UUID, UserSession> m_sessions = new Dictionary<UUID, UserSession>();
|
||||||
|
|
||||||
private List<Scene> m_scenes = new List<Scene>();
|
private List<Scene> m_scenes = new List<Scene>();
|
||||||
private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>();
|
private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>();
|
||||||
|
@ -319,14 +319,18 @@ namespace OpenSim.Region.UserStatistics
|
||||||
|
|
||||||
private void OnMakeRootAgent(ScenePresence agent)
|
private void OnMakeRootAgent(ScenePresence agent)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[WEB STATS MODULE]: Looking for session {0} for {1} in {2}",
|
||||||
|
// agent.ControllingClient.SessionId, agent.Name, agent.Scene.Name);
|
||||||
|
|
||||||
lock (m_sessions)
|
lock (m_sessions)
|
||||||
{
|
{
|
||||||
UserSessionID uid;
|
UserSession uid;
|
||||||
|
|
||||||
if (!m_sessions.ContainsKey(agent.UUID))
|
if (!m_sessions.ContainsKey(agent.UUID))
|
||||||
{
|
{
|
||||||
UserSessionData usd = UserSessionUtil.newUserSessionData();
|
UserSessionData usd = UserSessionUtil.newUserSessionData();
|
||||||
uid = new UserSessionID();
|
uid = new UserSession();
|
||||||
uid.name_f = agent.Firstname;
|
uid.name_f = agent.Firstname;
|
||||||
uid.name_l = agent.Lastname;
|
uid.name_l = agent.Lastname;
|
||||||
uid.session_data = usd;
|
uid.session_data = usd;
|
||||||
|
@ -411,9 +415,9 @@ namespace OpenSim.Region.UserStatistics
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private UserSessionID ParseViewerStats(string request, UUID agentID)
|
private UserSession ParseViewerStats(string request, UUID agentID)
|
||||||
{
|
{
|
||||||
UserSessionID uid = new UserSessionID();
|
UserSession uid = new UserSession();
|
||||||
UserSessionData usd;
|
UserSessionData usd;
|
||||||
OSD message = OSDParser.DeserializeLLSDXml(request);
|
OSD message = OSDParser.DeserializeLLSDXml(request);
|
||||||
OSDMap mmap;
|
OSDMap mmap;
|
||||||
|
@ -425,22 +429,25 @@ namespace OpenSim.Region.UserStatistics
|
||||||
if (!m_sessions.ContainsKey(agentID))
|
if (!m_sessions.ContainsKey(agentID))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[WEB STATS MODULE]: no session for stat disclosure for agent {0}", agentID);
|
m_log.WarnFormat("[WEB STATS MODULE]: no session for stat disclosure for agent {0}", agentID);
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
uid = m_sessions[agentID];
|
uid = m_sessions[agentID];
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[WEB STATS MODULE]: Got session {0} for {1}", uid.session_id, agentID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// parse through the beginning to locate the session
|
// parse through the beginning to locate the session
|
||||||
if (message.Type != OSDType.Map)
|
if (message.Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
|
|
||||||
mmap = (OSDMap)message;
|
mmap = (OSDMap)message;
|
||||||
{
|
{
|
||||||
UUID sessionID = mmap["session_id"].AsUUID();
|
UUID sessionID = mmap["session_id"].AsUUID();
|
||||||
|
|
||||||
if (sessionID == UUID.Zero)
|
if (sessionID == UUID.Zero)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
|
|
||||||
|
|
||||||
// search through each session looking for the owner
|
// search through each session looking for the owner
|
||||||
|
@ -459,7 +466,7 @@ namespace OpenSim.Region.UserStatistics
|
||||||
// can't find a session
|
// can't find a session
|
||||||
if (agentID == UUID.Zero)
|
if (agentID == UUID.Zero)
|
||||||
{
|
{
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -468,12 +475,12 @@ namespace OpenSim.Region.UserStatistics
|
||||||
usd = uid.session_data;
|
usd = uid.session_data;
|
||||||
|
|
||||||
if (message.Type != OSDType.Map)
|
if (message.Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
|
|
||||||
mmap = (OSDMap)message;
|
mmap = (OSDMap)message;
|
||||||
{
|
{
|
||||||
if (mmap["agent"].Type != OSDType.Map)
|
if (mmap["agent"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
OSDMap agent_map = (OSDMap)mmap["agent"];
|
OSDMap agent_map = (OSDMap)mmap["agent"];
|
||||||
usd.agent_id = agentID;
|
usd.agent_id = agentID;
|
||||||
usd.name_f = uid.name_f;
|
usd.name_f = uid.name_f;
|
||||||
|
@ -493,17 +500,18 @@ namespace OpenSim.Region.UserStatistics
|
||||||
(float)agent_map["fps"].AsReal());
|
(float)agent_map["fps"].AsReal());
|
||||||
|
|
||||||
if (mmap["downloads"].Type != OSDType.Map)
|
if (mmap["downloads"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
OSDMap downloads_map = (OSDMap)mmap["downloads"];
|
OSDMap downloads_map = (OSDMap)mmap["downloads"];
|
||||||
usd.d_object_kb = (float)downloads_map["object_kbytes"].AsReal();
|
usd.d_object_kb = (float)downloads_map["object_kbytes"].AsReal();
|
||||||
usd.d_texture_kb = (float)downloads_map["texture_kbytes"].AsReal();
|
usd.d_texture_kb = (float)downloads_map["texture_kbytes"].AsReal();
|
||||||
usd.d_world_kb = (float)downloads_map["workd_kbytes"].AsReal();
|
usd.d_world_kb = (float)downloads_map["workd_kbytes"].AsReal();
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[WEB STATS MODULE]: mmap[\"session_id\"] = [{0}]", mmap["session_id"].AsUUID());
|
||||||
|
|
||||||
usd.session_id = mmap["session_id"].AsUUID();
|
usd.session_id = mmap["session_id"].AsUUID();
|
||||||
|
|
||||||
if (mmap["system"].Type != OSDType.Map)
|
if (mmap["system"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
OSDMap system_map = (OSDMap)mmap["system"];
|
OSDMap system_map = (OSDMap)mmap["system"];
|
||||||
|
|
||||||
usd.s_cpu = system_map["cpu"].AsString();
|
usd.s_cpu = system_map["cpu"].AsString();
|
||||||
|
@ -512,13 +520,13 @@ namespace OpenSim.Region.UserStatistics
|
||||||
usd.s_ram = system_map["ram"].AsInteger();
|
usd.s_ram = system_map["ram"].AsInteger();
|
||||||
|
|
||||||
if (mmap["stats"].Type != OSDType.Map)
|
if (mmap["stats"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
|
|
||||||
OSDMap stats_map = (OSDMap)mmap["stats"];
|
OSDMap stats_map = (OSDMap)mmap["stats"];
|
||||||
{
|
{
|
||||||
|
|
||||||
if (stats_map["failures"].Type != OSDType.Map)
|
if (stats_map["failures"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
OSDMap stats_failures = (OSDMap)stats_map["failures"];
|
OSDMap stats_failures = (OSDMap)stats_map["failures"];
|
||||||
usd.f_dropped = stats_failures["dropped"].AsInteger();
|
usd.f_dropped = stats_failures["dropped"].AsInteger();
|
||||||
usd.f_failed_resends = stats_failures["failed_resends"].AsInteger();
|
usd.f_failed_resends = stats_failures["failed_resends"].AsInteger();
|
||||||
|
@ -527,18 +535,18 @@ namespace OpenSim.Region.UserStatistics
|
||||||
usd.f_send_packet = stats_failures["send_packet"].AsInteger();
|
usd.f_send_packet = stats_failures["send_packet"].AsInteger();
|
||||||
|
|
||||||
if (stats_map["net"].Type != OSDType.Map)
|
if (stats_map["net"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
OSDMap stats_net = (OSDMap)stats_map["net"];
|
OSDMap stats_net = (OSDMap)stats_map["net"];
|
||||||
{
|
{
|
||||||
if (stats_net["in"].Type != OSDType.Map)
|
if (stats_net["in"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
|
|
||||||
OSDMap net_in = (OSDMap)stats_net["in"];
|
OSDMap net_in = (OSDMap)stats_net["in"];
|
||||||
usd.n_in_kb = (float)net_in["kbytes"].AsReal();
|
usd.n_in_kb = (float)net_in["kbytes"].AsReal();
|
||||||
usd.n_in_pk = net_in["packets"].AsInteger();
|
usd.n_in_pk = net_in["packets"].AsInteger();
|
||||||
|
|
||||||
if (stats_net["out"].Type != OSDType.Map)
|
if (stats_net["out"].Type != OSDType.Map)
|
||||||
return new UserSessionID();
|
return new UserSession();
|
||||||
OSDMap net_out = (OSDMap)stats_net["out"];
|
OSDMap net_out = (OSDMap)stats_net["out"];
|
||||||
|
|
||||||
usd.n_out_kb = (float)net_out["kbytes"].AsReal();
|
usd.n_out_kb = (float)net_out["kbytes"].AsReal();
|
||||||
|
@ -549,11 +557,18 @@ namespace OpenSim.Region.UserStatistics
|
||||||
|
|
||||||
uid.session_data = usd;
|
uid.session_data = usd;
|
||||||
m_sessions[agentID] = uid;
|
m_sessions[agentID] = uid;
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[WEB STATS MODULE]: Parse data for {0} {1}, session {2}", uid.name_f, uid.name_l, uid.session_id);
|
||||||
|
|
||||||
return uid;
|
return uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateUserStats(UserSessionID uid, SqliteConnection db)
|
private void UpdateUserStats(UserSession uid, SqliteConnection db)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[WEB STATS MODULE]: Updating user stats for {0} {1}, session {2}", uid.name_f, uid.name_l, uid.session_id);
|
||||||
|
|
||||||
if (uid.session_id == UUID.Zero)
|
if (uid.session_id == UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -740,7 +755,6 @@ VALUES
|
||||||
s.min_ping = ArrayMin_f(__ping);
|
s.min_ping = ArrayMin_f(__ping);
|
||||||
s.max_ping = ArrayMax_f(__ping);
|
s.max_ping = ArrayMax_f(__ping);
|
||||||
s.mode_ping = ArrayMode_f(__ping);
|
s.mode_ping = ArrayMode_f(__ping);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Statistics
|
#region Statistics
|
||||||
|
@ -985,7 +999,7 @@ VALUES
|
||||||
}
|
}
|
||||||
#region structs
|
#region structs
|
||||||
|
|
||||||
public struct UserSessionID
|
public class UserSession
|
||||||
{
|
{
|
||||||
public UUID session_id;
|
public UUID session_id;
|
||||||
public UUID region_id;
|
public UUID region_id;
|
||||||
|
|
|
@ -60,7 +60,25 @@ namespace OpenSim.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
|
string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
|
||||||
string[] conns = connList.Split(new char[] {',', ' '});
|
|
||||||
|
IConfig servicesConfig = m_Server.Config.Configs["ServiceList"];
|
||||||
|
if (servicesConfig != null)
|
||||||
|
{
|
||||||
|
List<string> servicesList = new List<string>();
|
||||||
|
if (connList != String.Empty)
|
||||||
|
servicesList.Add(connList);
|
||||||
|
|
||||||
|
foreach (string k in servicesConfig.GetKeys())
|
||||||
|
{
|
||||||
|
string v = servicesConfig.GetString(k);
|
||||||
|
if (v != String.Empty)
|
||||||
|
servicesList.Add(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
connList = String.Join(",", servicesList.ToArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] conns = connList.Split(new char[] {',', ' ', '\n', '\r', '\t'});
|
||||||
|
|
||||||
// int i = 0;
|
// int i = 0;
|
||||||
foreach (string c in conns)
|
foreach (string c in conns)
|
||||||
|
|
|
@ -13,7 +13,23 @@
|
||||||
; * [[<ConfigName>@]<port>/]<dll name>[:<class name>]
|
; * [[<ConfigName>@]<port>/]<dll name>[:<class name>]
|
||||||
; *
|
; *
|
||||||
[Startup]
|
[Startup]
|
||||||
ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8003/OpenSim.Server.Handlers.dll:MapAddServiceConnector,8002/OpenSim.Server.Handlers.dll:MapGetServiceConnector"
|
|
||||||
|
[ServiceList]
|
||||||
|
AssetServiceConnector = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector"
|
||||||
|
InventoryInConnector = "8003/OpenSim.Server.Handlers.dll:XInventoryInConnector"
|
||||||
|
VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector"
|
||||||
|
GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector"
|
||||||
|
GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
|
||||||
|
AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector"
|
||||||
|
OpenIdServerConnector = "8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector"
|
||||||
|
AvatarServiceConnector = "8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector"
|
||||||
|
LLLoginServiceInConnector = "8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector"
|
||||||
|
PresenceServiceConnector = "8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector"
|
||||||
|
UserAccountServiceConnector = "8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector"
|
||||||
|
GridUserServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector"
|
||||||
|
FriendsServiceConnector = "8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector"
|
||||||
|
MapAddServiceConnector = "8003/OpenSim.Server.Handlers.dll:MapAddServiceConnector"
|
||||||
|
MapGetServiceConnector = "8002/OpenSim.Server.Handlers.dll:MapGetServiceConnector"
|
||||||
|
|
||||||
; * This is common for all services, it's the network setup for the entire
|
; * This is common for all services, it's the network setup for the entire
|
||||||
; * server instance, if none is specified above
|
; * server instance, if none is specified above
|
||||||
|
|
Loading…
Reference in New Issue