Fix issue in the mesh upload flag module where the ID of the last agent to request the capability was always used instead of the original requesting agent for each cap.

Should address http://opensimulator.org/mantis/view.php?id=6556
0.7.5-pf-bulletsim
Justin Clark-Casey (justincc) 2013-03-04 23:20:00 +00:00
parent a6722abbed
commit 40ed5433bd
1 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,6 @@ namespace OpenSim.Region.ClientStack.Linden
public bool Enabled { get; private set; } public bool Enabled { get; private set; }
private Scene m_scene; private Scene m_scene;
private UUID m_agentID;
#region ISharedRegionModule Members #region ISharedRegionModule Members
@ -118,25 +117,26 @@ namespace OpenSim.Region.ClientStack.Linden
public void RegisterCaps(UUID agentID, Caps caps) public void RegisterCaps(UUID agentID, Caps caps)
{ {
IRequestHandler reqHandler IRequestHandler reqHandler
= new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), MeshUploadFlag, "MeshUploadFlag", agentID.ToString()); = new RestHTTPHandler(
"GET", "/CAPS/" + UUID.Random(), ht => MeshUploadFlag(ht, agentID), "MeshUploadFlag", agentID.ToString());
caps.RegisterHandler("MeshUploadFlag", reqHandler); caps.RegisterHandler("MeshUploadFlag", reqHandler);
m_agentID = agentID;
} }
private Hashtable MeshUploadFlag(Hashtable mDhttpMethod) private Hashtable MeshUploadFlag(Hashtable mDhttpMethod, UUID agentID)
{ {
// m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request"); // m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request");
OSDMap data = new OSDMap(); OSDMap data = new OSDMap();
ScenePresence sp = m_scene.GetScenePresence(m_agentID); ScenePresence sp = m_scene.GetScenePresence(agentID);
data["username"] = sp.Firstname + "." + sp.Lastname; data["username"] = sp.Firstname + "." + sp.Lastname;
data["display_name_next_update"] = new OSDDate(DateTime.Now); data["display_name_next_update"] = new OSDDate(DateTime.Now);
data["legacy_first_name"] = sp.Firstname; data["legacy_first_name"] = sp.Firstname;
data["mesh_upload_status"] = "valid"; data["mesh_upload_status"] = "valid";
data["display_name"] = sp.Firstname + " " + sp.Lastname; data["display_name"] = sp.Firstname + " " + sp.Lastname;
data["legacy_last_name"] = sp.Lastname; data["legacy_last_name"] = sp.Lastname;
data["id"] = m_agentID; data["id"] = agentID;
data["is_display_name_default"] = true; data["is_display_name_default"] = true;
//Send back data //Send back data