Merge branch 'avination' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.csavinationmerge
commit
f39e4abf0e
|
@ -30,6 +30,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -68,6 +69,7 @@ namespace OpenSim.Framework.Capabilities
|
||||||
private IHttpServer m_httpListener;
|
private IHttpServer m_httpListener;
|
||||||
private UUID m_agentID;
|
private UUID m_agentID;
|
||||||
private string m_regionName;
|
private string m_regionName;
|
||||||
|
private ManualResetEvent m_capsActive = new ManualResetEvent(false);
|
||||||
|
|
||||||
public UUID AgentID
|
public UUID AgentID
|
||||||
{
|
{
|
||||||
|
@ -171,5 +173,16 @@ namespace OpenSim.Framework.Capabilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Activate()
|
||||||
|
{
|
||||||
|
m_capsActive.Set();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool WaitForActivation()
|
||||||
|
{
|
||||||
|
// Wait for 30s. If that elapses, return false and run without caps
|
||||||
|
return m_capsActive.WaitOne(30000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,6 +342,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID);
|
"[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID);
|
||||||
|
|
||||||
|
if (!m_HostCapsObj.WaitForActivation())
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint))
|
if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
|
|
|
@ -467,8 +467,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
responsedata["content_type"] = "text/plain";
|
responsedata["content_type"] = "text/plain";
|
||||||
responsedata["keepalive"] = false;
|
responsedata["keepalive"] = false;
|
||||||
responsedata["reusecontext"] = false;
|
responsedata["reusecontext"] = false;
|
||||||
responsedata["str_response_string"] = "Upstream error: ";
|
responsedata["str_response_string"] = "<llsd></llsd>";
|
||||||
responsedata["error_status_text"] = "Upstream error:";
|
responsedata["error_status_text"] = "<llsd></llsd>";
|
||||||
responsedata["http_protocol_version"] = "HTTP/1.0";
|
responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||||
return responsedata;
|
return responsedata;
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,6 +211,10 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
m_log.Error("Request: " + request);
|
m_log.Error("Request: " + request);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
catch (System.Xml.XmlException)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat("[INVENTORY]: XML Format error");
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList foldersrequested = (ArrayList)hash["folders"];
|
ArrayList foldersrequested = (ArrayList)hash["folders"];
|
||||||
|
|
||||||
|
|
|
@ -3901,6 +3901,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
part.Shape.ProfileHollow = 27500;
|
part.Shape.ProfileHollow = 27500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh))
|
||||||
|
{
|
||||||
|
// Ensure that mesh has at least 8 valid faces
|
||||||
|
part.Shape.ProfileBegin = 12500;
|
||||||
|
part.Shape.ProfileEnd = 0;
|
||||||
|
part.Shape.ProfileHollow = 27500;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
++updatesThisCall;
|
++updatesThisCall;
|
||||||
|
@ -4960,6 +4968,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
position = part.OffsetPosition + presence.OffsetPosition * part.RotationOffset;
|
position = part.OffsetPosition + presence.OffsetPosition * part.RotationOffset;
|
||||||
rotation = part.RotationOffset * presence.Rotation;
|
rotation = part.RotationOffset * presence.Rotation;
|
||||||
}
|
}
|
||||||
|
angularVelocity = Vector3.Zero;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
angularVelocity = presence.AngularVelocity;
|
||||||
|
rotation = presence.Rotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
attachPoint = 0;
|
attachPoint = 0;
|
||||||
|
@ -4972,9 +4986,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// may improve movement smoothness.
|
// may improve movement smoothness.
|
||||||
// acceleration = new Vector3(1, 0, 0);
|
// acceleration = new Vector3(1, 0, 0);
|
||||||
|
|
||||||
angularVelocity = presence.AngularVelocity;
|
|
||||||
rotation = presence.Rotation;
|
|
||||||
|
|
||||||
if (sendTexture)
|
if (sendTexture)
|
||||||
textureEntry = presence.Appearance.Texture.GetBytes();
|
textureEntry = presence.Appearance.Texture.GetBytes();
|
||||||
else
|
else
|
||||||
|
|
|
@ -260,10 +260,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
{
|
{
|
||||||
CompleteTaskItemUpdate(m_updateTaskItemData);
|
CompleteTaskItemUpdate(m_updateTaskItemData);
|
||||||
}
|
}
|
||||||
// else if (m_storeLocal)
|
else if (m_asset.Local)
|
||||||
// {
|
{
|
||||||
// m_Scene.AssetService.Store(m_asset);
|
m_Scene.AssetService.Store(m_asset);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
|
@ -391,6 +391,11 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
// m_asset.FullID, item.Name, ourClient.Name);
|
// m_asset.FullID, item.Name, ourClient.Name);
|
||||||
|
|
||||||
m_Scene.AssetService.Store(m_asset);
|
m_Scene.AssetService.Store(m_asset);
|
||||||
|
if (m_asset.FullID != UUID.Zero)
|
||||||
|
{
|
||||||
|
item.AssetID = m_asset.FullID;
|
||||||
|
m_Scene.InventoryService.UpdateItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
m_transactions.RemoveXferUploader(m_transactionID);
|
m_transactions.RemoveXferUploader(m_transactionID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Each agent has its own capabilities handler.
|
/// Each agent has its own capabilities handler.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected Dictionary<UUID, Caps> m_capsObjects = new Dictionary<UUID, Caps>();
|
protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>();
|
||||||
|
|
||||||
protected Dictionary<UUID, string> capsPaths = new Dictionary<UUID, string>();
|
protected Dictionary<UUID, string> capsPaths = new Dictionary<UUID, string>();
|
||||||
protected Dictionary<UUID, Dictionary<ulong, string>> childrenSeeds
|
protected Dictionary<UUID, Dictionary<ulong, string>> childrenSeeds
|
||||||
|
@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||||
get { return null; }
|
get { return null; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateCaps(UUID agentId)
|
public void CreateCaps(UUID agentId, uint circuitCode)
|
||||||
{
|
{
|
||||||
int flags = m_scene.GetUserFlags(agentId);
|
int flags = m_scene.GetUserFlags(agentId);
|
||||||
if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags))
|
if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags))
|
||||||
|
@ -108,9 +108,9 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||||
|
|
||||||
String capsObjectPath = GetCapsPath(agentId);
|
String capsObjectPath = GetCapsPath(agentId);
|
||||||
|
|
||||||
if (m_capsObjects.ContainsKey(agentId))
|
if (m_capsObjects.ContainsKey(circuitCode))
|
||||||
{
|
{
|
||||||
Caps oldCaps = m_capsObjects[agentId];
|
Caps oldCaps = m_capsObjects[circuitCode];
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ",
|
"[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ",
|
||||||
|
@ -125,12 +125,12 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||||
(MainServer.Instance == null) ? 0: MainServer.Instance.Port,
|
(MainServer.Instance == null) ? 0: MainServer.Instance.Port,
|
||||||
capsObjectPath, agentId, m_scene.RegionInfo.RegionName);
|
capsObjectPath, agentId, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
m_capsObjects[agentId] = caps;
|
m_capsObjects[circuitCode] = caps;
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps);
|
m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveCaps(UUID agentId)
|
public void RemoveCaps(UUID agentId, uint circuitCode)
|
||||||
{
|
{
|
||||||
if (childrenSeeds.ContainsKey(agentId))
|
if (childrenSeeds.ContainsKey(agentId))
|
||||||
{
|
{
|
||||||
|
@ -139,11 +139,11 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||||
|
|
||||||
lock (m_capsObjects)
|
lock (m_capsObjects)
|
||||||
{
|
{
|
||||||
if (m_capsObjects.ContainsKey(agentId))
|
if (m_capsObjects.ContainsKey(circuitCode))
|
||||||
{
|
{
|
||||||
m_capsObjects[agentId].DeregisterHandlers();
|
m_capsObjects[circuitCode].DeregisterHandlers();
|
||||||
m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsObjects[agentId]);
|
m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsObjects[circuitCode]);
|
||||||
m_capsObjects.Remove(agentId);
|
m_capsObjects.Remove(circuitCode);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -154,19 +154,30 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Caps GetCapsForUser(UUID agentId)
|
public Caps GetCapsForUser(uint circuitCode)
|
||||||
{
|
{
|
||||||
lock (m_capsObjects)
|
lock (m_capsObjects)
|
||||||
{
|
{
|
||||||
if (m_capsObjects.ContainsKey(agentId))
|
if (m_capsObjects.ContainsKey(circuitCode))
|
||||||
{
|
{
|
||||||
return m_capsObjects[agentId];
|
return m_capsObjects[circuitCode];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ActivateCaps(uint circuitCode)
|
||||||
|
{
|
||||||
|
lock (m_capsObjects)
|
||||||
|
{
|
||||||
|
if (m_capsObjects.ContainsKey(circuitCode))
|
||||||
|
{
|
||||||
|
m_capsObjects[circuitCode].Activate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SetAgentCapsSeeds(AgentCircuitData agent)
|
public void SetAgentCapsSeeds(AgentCircuitData agent)
|
||||||
{
|
{
|
||||||
capsPaths[agent.AgentID] = agent.CapsPath;
|
capsPaths[agent.AgentID] = agent.CapsPath;
|
||||||
|
@ -237,9 +248,9 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||||
StringBuilder caps = new StringBuilder();
|
StringBuilder caps = new StringBuilder();
|
||||||
caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName);
|
caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
foreach (KeyValuePair<UUID, Caps> kvp in m_capsObjects)
|
foreach (KeyValuePair<uint, Caps> kvp in m_capsObjects)
|
||||||
{
|
{
|
||||||
caps.AppendFormat("** User {0}:\n", kvp.Key);
|
caps.AppendFormat("** Circuit {0}:\n", kvp.Key);
|
||||||
|
|
||||||
for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); )
|
for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); )
|
||||||
{
|
{
|
||||||
|
|
|
@ -150,7 +150,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
{
|
{
|
||||||
client.OnTeleportHomeRequest += TriggerTeleportHome;
|
client.OnTeleportHomeRequest += TriggerTeleportHome;
|
||||||
client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
|
client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
|
||||||
client.OnTeleportCancel += TeleportCancel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Close() {}
|
public virtual void Close() {}
|
||||||
|
@ -1020,11 +1019,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
return neighbourRegion;
|
return neighbourRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TeleportCancel(IClientAPI remoteClient)
|
|
||||||
{
|
|
||||||
m_entityTransferStateMachine.ResetFromTransit(remoteClient.AgentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Cross(ScenePresence agent, bool isFlying)
|
public bool Cross(ScenePresence agent, bool isFlying)
|
||||||
{
|
{
|
||||||
uint x;
|
uint x;
|
||||||
|
|
|
@ -50,6 +50,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
public string url;
|
public string url;
|
||||||
public UUID urlcode;
|
public UUID urlcode;
|
||||||
public Dictionary<UUID, RequestData> requests;
|
public Dictionary<UUID, RequestData> requests;
|
||||||
|
public bool isSsl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RequestData
|
public class RequestData
|
||||||
|
@ -195,6 +196,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
urlData.engine = engine;
|
urlData.engine = engine;
|
||||||
urlData.url = url;
|
urlData.url = url;
|
||||||
urlData.urlcode = urlcode;
|
urlData.urlcode = urlcode;
|
||||||
|
urlData.isSsl = false;
|
||||||
urlData.requests = new Dictionary<UUID, RequestData>();
|
urlData.requests = new Dictionary<UUID, RequestData>();
|
||||||
|
|
||||||
m_UrlMap[url] = urlData;
|
m_UrlMap[url] = urlData;
|
||||||
|
@ -240,6 +242,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
urlData.engine = engine;
|
urlData.engine = engine;
|
||||||
urlData.url = url;
|
urlData.url = url;
|
||||||
urlData.urlcode = urlcode;
|
urlData.urlcode = urlcode;
|
||||||
|
urlData.isSsl = true;
|
||||||
urlData.requests = new Dictionary<UUID, RequestData>();
|
urlData.requests = new Dictionary<UUID, RequestData>();
|
||||||
|
|
||||||
|
|
||||||
|
@ -421,6 +424,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
private void RemoveUrl(UrlData data)
|
private void RemoveUrl(UrlData data)
|
||||||
{
|
{
|
||||||
|
if (data.isSsl)
|
||||||
|
m_HttpsServer.RemoveHTTPHandler("", "/lslhttps/"+data.urlcode.ToString()+"/");
|
||||||
|
else
|
||||||
m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/");
|
m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,19 +40,19 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="agentId"></param>
|
/// <param name="agentId"></param>
|
||||||
/// <param name="capsObjectPath"></param>
|
/// <param name="capsObjectPath"></param>
|
||||||
void CreateCaps(UUID agentId);
|
void CreateCaps(UUID agentId, uint circuitCode);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove the caps handler for a given agent.
|
/// Remove the caps handler for a given agent.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="agentId"></param>
|
/// <param name="agentId"></param>
|
||||||
void RemoveCaps(UUID agentId);
|
void RemoveCaps(UUID agentId, uint circuitCode);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Will return null if the agent doesn't have a caps handler registered
|
/// Will return null if the agent doesn't have a caps handler registered
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="agentId"></param>
|
/// <param name="agentId"></param>
|
||||||
Caps GetCapsForUser(UUID agentId);
|
Caps GetCapsForUser(uint circuitCode);
|
||||||
|
|
||||||
void SetAgentCapsSeeds(AgentCircuitData agent);
|
void SetAgentCapsSeeds(AgentCircuitData agent);
|
||||||
|
|
||||||
|
@ -65,5 +65,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
void DropChildSeed(UUID agentID, ulong handle);
|
void DropChildSeed(UUID agentID, ulong handle);
|
||||||
|
|
||||||
string GetCapsPath(UUID agentId);
|
string GetCapsPath(UUID agentId);
|
||||||
|
|
||||||
|
void ActivateCaps(uint circuitCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,6 +276,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
newMotion.m_timerStopped = false;
|
newMotion.m_timerStopped = false;
|
||||||
|
newMotion.m_running = true;
|
||||||
newMotion.m_isCrossing = false;
|
newMotion.m_isCrossing = false;
|
||||||
newMotion.m_waitingCrossing = false;
|
newMotion.m_waitingCrossing = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2758,8 +2758,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (newPosition != Vector3.Zero)
|
if (newPosition != Vector3.Zero)
|
||||||
newObject.RootPart.GroupPosition = newPosition;
|
newObject.RootPart.GroupPosition = newPosition;
|
||||||
if (newObject.RootPart.KeyframeMotion != null)
|
|
||||||
newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject);
|
|
||||||
|
|
||||||
if (!AddSceneObject(newObject))
|
if (!AddSceneObject(newObject))
|
||||||
{
|
{
|
||||||
|
@ -2787,6 +2785,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// before we restart the scripts, or else some functions won't work.
|
// before we restart the scripts, or else some functions won't work.
|
||||||
newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
|
newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
|
||||||
newObject.ResumeScripts();
|
newObject.ResumeScripts();
|
||||||
|
|
||||||
|
if (newObject.RootPart.KeyframeMotion != null)
|
||||||
|
newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do this as late as possible so that listeners have full access to the incoming object
|
// Do this as late as possible so that listeners have full access to the incoming object
|
||||||
|
@ -3611,7 +3612,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop
|
// TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop
|
||||||
// unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
|
// unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
|
||||||
if (closeChildAgents && CapsModule != null)
|
if (closeChildAgents && CapsModule != null)
|
||||||
CapsModule.RemoveCaps(agentID);
|
CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode);
|
||||||
|
|
||||||
// // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
|
// // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
|
||||||
// // this method is doing is HORRIBLE!!!
|
// // this method is doing is HORRIBLE!!!
|
||||||
|
@ -3842,10 +3843,25 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ScenePresence sp = GetScenePresence(agent.AgentID);
|
ScenePresence sp = GetScenePresence(agent.AgentID);
|
||||||
|
|
||||||
if (sp != null && !sp.IsChildAgent)
|
// If we have noo presence here or if that presence is a zombie root
|
||||||
|
// presence that will be kicled, we need a new CAPS object.
|
||||||
|
if (sp == null || (sp != null && !sp.IsChildAgent))
|
||||||
|
{
|
||||||
|
if (CapsModule != null)
|
||||||
|
{
|
||||||
|
lock (agent)
|
||||||
|
{
|
||||||
|
CapsModule.SetAgentCapsSeeds(agent);
|
||||||
|
CapsModule.CreateCaps(agent.AgentID, agent.circuitcode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sp != null)
|
||||||
|
{
|
||||||
|
if (!sp.IsChildAgent)
|
||||||
{
|
{
|
||||||
// We have a zombie from a crashed session.
|
// We have a zombie from a crashed session.
|
||||||
// Or the same user is trying to be root twice here, won't work.
|
// Or the same user is trying to be root twice here, won't work.
|
||||||
|
@ -3857,6 +3873,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sp.ControllingClient.Close(true, true);
|
sp.ControllingClient.Close(true, true);
|
||||||
sp = null;
|
sp = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lock (agent)
|
lock (agent)
|
||||||
{
|
{
|
||||||
|
@ -3896,9 +3913,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (vialogin || (!m_seeIntoBannedRegion))
|
if (vialogin || (!m_seeIntoBannedRegion))
|
||||||
{
|
{
|
||||||
if (!AuthorizeUser(agent, out reason))
|
if (!AuthorizeUser(agent, out reason))
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
|
@ -3911,11 +3930,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname,
|
||||||
agent.AgentID, agent.circuitcode);
|
agent.AgentID, agent.circuitcode);
|
||||||
|
|
||||||
if (CapsModule != null)
|
|
||||||
{
|
|
||||||
CapsModule.SetAgentCapsSeeds(agent);
|
|
||||||
CapsModule.CreateCaps(agent.AgentID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3941,6 +3955,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
agent.teleportFlags = teleportFlags;
|
agent.teleportFlags = teleportFlags;
|
||||||
m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
|
m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
|
||||||
|
|
||||||
|
if (CapsModule != null)
|
||||||
|
{
|
||||||
|
CapsModule.ActivateCaps(agent.circuitcode);
|
||||||
|
}
|
||||||
|
|
||||||
if (vialogin)
|
if (vialogin)
|
||||||
{
|
{
|
||||||
// CleanDroppedAttachments();
|
// CleanDroppedAttachments();
|
||||||
|
|
|
@ -1655,7 +1655,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object osParseJSONNew(string JSON)
|
private Object osParseJSONNew(string JSON)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.None, "osParseJSONNew");
|
CheckThreatLevel(ThreatLevel.None, "osParseJSONNew");
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
string osGetScriptEngineName();
|
string osGetScriptEngineName();
|
||||||
string osGetSimulatorVersion();
|
string osGetSimulatorVersion();
|
||||||
string osGetPhysicsEngineType();
|
string osGetPhysicsEngineType();
|
||||||
Object osParseJSONNew(string JSON);
|
|
||||||
Hashtable osParseJSON(string JSON);
|
Hashtable osParseJSON(string JSON);
|
||||||
|
|
||||||
void osMessageObject(key objectUUID,string message);
|
void osMessageObject(key objectUUID,string message);
|
||||||
|
|
|
@ -435,11 +435,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
return m_OSSL_Functions.osParseJSON(JSON);
|
return m_OSSL_Functions.osParseJSON(JSON);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object osParseJSONNew(string JSON)
|
|
||||||
{
|
|
||||||
return m_OSSL_Functions.osParseJSONNew(JSON);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void osMessageObject(key objectUUID,string message)
|
public void osMessageObject(key objectUUID,string message)
|
||||||
{
|
{
|
||||||
m_OSSL_Functions.osMessageObject(objectUUID,message);
|
m_OSSL_Functions.osMessageObject(objectUUID,message);
|
||||||
|
|
Loading…
Reference in New Issue