Plumb the viewer version string through into AgentCircuitData. Now all that

is left os to figure out what black magic turns AgentCircuitData into
AgentData and then copy that into the ScenePresence, where m_Viewer is
already added with this commit and waits for the data.
avinationmerge
Melanie Thielker 2010-05-06 00:34:49 +02:00
parent 65775b87e5
commit 733a07e061
5 changed files with 27 additions and 9 deletions

View File

@ -107,6 +107,11 @@ namespace OpenSim.Framework
/// </summary> /// </summary>
public string ServiceSessionID = string.Empty; public string ServiceSessionID = string.Empty;
/// <summary>
/// Viewer's version string
/// </summary>
public string Viewer;
/// <summary> /// <summary>
/// Position the Agent's Avatar starts in the region /// Position the Agent's Avatar starts in the region
/// </summary> /// </summary>
@ -136,6 +141,7 @@ namespace OpenSim.Framework
BaseFolder = new UUID(cAgent.BaseFolder); BaseFolder = new UUID(cAgent.BaseFolder);
CapsPath = cAgent.CapsPath; CapsPath = cAgent.CapsPath;
ChildrenCapSeeds = cAgent.ChildrenCapSeeds; ChildrenCapSeeds = cAgent.ChildrenCapSeeds;
Viewer = cAgent.Viewer;
} }
/// <summary> /// <summary>
@ -173,6 +179,7 @@ namespace OpenSim.Framework
args["service_session_id"] = OSD.FromString(ServiceSessionID); args["service_session_id"] = OSD.FromString(ServiceSessionID);
args["start_pos"] = OSD.FromString(startpos.ToString()); args["start_pos"] = OSD.FromString(startpos.ToString());
args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
args["viewer"] = OSD.FromString(Viewer);
if (Appearance != null) if (Appearance != null)
{ {
@ -272,6 +279,8 @@ namespace OpenSim.Framework
SessionID = args["session_id"].AsUUID(); SessionID = args["session_id"].AsUUID();
if (args["service_session_id"] != null) if (args["service_session_id"] != null)
ServiceSessionID = args["service_session_id"].AsString(); ServiceSessionID = args["service_session_id"].AsString();
if (args["viewer"] != null)
Viewer = args["viewer"].AsString();
if (args["start_pos"] != null) if (args["start_pos"] != null)
Vector3.TryParse(args["start_pos"].AsString(), out startpos); Vector3.TryParse(args["start_pos"].AsString(), out startpos);
@ -339,6 +348,7 @@ namespace OpenSim.Framework
public float startposx; public float startposx;
public float startposy; public float startposy;
public float startposz; public float startposz;
public string Viewer;
public sAgentCircuitData() public sAgentCircuitData()
{ {
@ -360,6 +370,7 @@ namespace OpenSim.Framework
BaseFolder = cAgent.BaseFolder.Guid; BaseFolder = cAgent.BaseFolder.Guid;
CapsPath = cAgent.CapsPath; CapsPath = cAgent.CapsPath;
ChildrenCapSeeds = cAgent.ChildrenCapSeeds; ChildrenCapSeeds = cAgent.ChildrenCapSeeds;
Viewer = cAgent.Viewer;
} }
} }
} }

View File

@ -227,6 +227,7 @@ namespace OpenSim.Region.Framework.Scenes
private int m_lastColCount = -1; //KF: Look for Collision chnages private int m_lastColCount = -1; //KF: Look for Collision chnages
private int m_updateCount = 0; //KF: Update Anims for a while private int m_updateCount = 0; //KF: Update Anims for a while
private static readonly int UPDATE_COUNT = 10; // how many frames to update for private static readonly int UPDATE_COUNT = 10; // how many frames to update for
private string m_Viewer = String.Empty;
private const int NumMovementsBetweenRayCast = 5; private const int NumMovementsBetweenRayCast = 5;
@ -664,6 +665,11 @@ namespace OpenSim.Region.Framework.Scenes
set { m_flyDisabled = value; } set { m_flyDisabled = value; }
} }
public string Viewer
{
get { return m_Viewer; }
}
#endregion #endregion
#region Constructor(s) #region Constructor(s)

View File

@ -86,7 +86,7 @@ namespace OpenSim.Server.Handlers.Login
m_log.InfoFormat("[LOGIN]: XMLRPC Login Requested for {0} {1}, starting in {2}, using {3}", first, last, startLocation, clientVersion); m_log.InfoFormat("[LOGIN]: XMLRPC Login Requested for {0} {1}, starting in {2}, using {3}", first, last, startLocation, clientVersion);
LoginResponse reply = null; LoginResponse reply = null;
reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, remoteClient); reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, remoteClient);
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
response.Value = reply.ToHashtable(); response.Value = reply.ToHashtable();
@ -157,7 +157,7 @@ namespace OpenSim.Server.Handlers.Login
m_log.Info("[LOGIN]: LLSD Login Requested for: '" + map["first"].AsString() + "' '" + map["last"].AsString() + "' / " + startLocation); m_log.Info("[LOGIN]: LLSD Login Requested for: '" + map["first"].AsString() + "' '" + map["last"].AsString() + "' / " + startLocation);
LoginResponse reply = null; LoginResponse reply = null;
reply = m_LocalService.Login(map["first"].AsString(), map["last"].AsString(), map["passwd"].AsString(), startLocation, scopeID, remoteClient); reply = m_LocalService.Login(map["first"].AsString(), map["last"].AsString(), map["passwd"].AsString(), startLocation, scopeID, String.Empty, remoteClient);
return reply.ToOSDMap(); return reply.ToOSDMap();
} }

View File

@ -47,7 +47,7 @@ namespace OpenSim.Services.Interfaces
public interface ILoginService public interface ILoginService
{ {
LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, IPEndPoint clientIP); LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, string clientVersion, IPEndPoint clientIP);
Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP); Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP);
} }

View File

@ -200,7 +200,7 @@ namespace OpenSim.Services.LLLoginService
return response; return response;
} }
public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, IPEndPoint clientIP) public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, string clientVersion, IPEndPoint clientIP)
{ {
bool success = false; bool success = false;
UUID session = UUID.Random(); UUID session = UUID.Random();
@ -326,7 +326,7 @@ namespace OpenSim.Services.LLLoginService
// Instantiate/get the simulation interface and launch an agent at the destination // Instantiate/get the simulation interface and launch an agent at the destination
// //
string reason = string.Empty; string reason = string.Empty;
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, out where, out reason); AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, out where, out reason);
if (aCircuit == null) if (aCircuit == null)
{ {
@ -592,7 +592,7 @@ namespace OpenSim.Services.LLLoginService
} }
protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar, protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar,
UUID session, UUID secureSession, Vector3 position, string currentWhere, out string where, out string reason) UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, out string where, out string reason)
{ {
where = currentWhere; where = currentWhere;
ISimulationService simConnector = null; ISimulationService simConnector = null;
@ -632,7 +632,7 @@ namespace OpenSim.Services.LLLoginService
if (m_UserAgentService == null && simConnector != null) if (m_UserAgentService == null && simConnector != null)
{ {
circuitCode = (uint)Util.RandomClass.Next(); ; circuitCode = (uint)Util.RandomClass.Next(); ;
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position); aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer);
success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason); success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason);
if (!success && m_GridService != null) if (!success && m_GridService != null)
{ {
@ -657,7 +657,7 @@ namespace OpenSim.Services.LLLoginService
if (m_UserAgentService != null) if (m_UserAgentService != null)
{ {
circuitCode = (uint)Util.RandomClass.Next(); ; circuitCode = (uint)Util.RandomClass.Next(); ;
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position); aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer);
success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, out reason); success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, out reason);
if (!success && m_GridService != null) if (!success && m_GridService != null)
{ {
@ -686,7 +686,7 @@ namespace OpenSim.Services.LLLoginService
} }
private AgentCircuitData MakeAgent(GridRegion region, UserAccount account, private AgentCircuitData MakeAgent(GridRegion region, UserAccount account,
AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position) AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position, string viewer)
{ {
AgentCircuitData aCircuit = new AgentCircuitData(); AgentCircuitData aCircuit = new AgentCircuitData();
@ -707,6 +707,7 @@ namespace OpenSim.Services.LLLoginService
aCircuit.SecureSessionID = secureSession; aCircuit.SecureSessionID = secureSession;
aCircuit.SessionID = session; aCircuit.SessionID = session;
aCircuit.startpos = position; aCircuit.startpos = position;
aCircuit.Viewer = viewer;
SetServiceURLs(aCircuit, account); SetServiceURLs(aCircuit, account);
return aCircuit; return aCircuit;