mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Merge branch 'avination' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
This commit is contained in:
@@ -260,10 +260,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
{
|
||||
CompleteTaskItemUpdate(m_updateTaskItemData);
|
||||
}
|
||||
// else if (m_storeLocal)
|
||||
// {
|
||||
// m_Scene.AssetService.Store(m_asset);
|
||||
// }
|
||||
else if (m_asset.Local)
|
||||
{
|
||||
m_Scene.AssetService.Store(m_asset);
|
||||
}
|
||||
}
|
||||
|
||||
m_log.DebugFormat(
|
||||
@@ -391,6 +391,11 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
// m_asset.FullID, item.Name, ourClient.Name);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
/// <summary>
|
||||
/// Each agent has its own capabilities handler.
|
||||
/// </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, Dictionary<ulong, string>> childrenSeeds
|
||||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void CreateCaps(UUID agentId)
|
||||
public void CreateCaps(UUID agentId, uint circuitCode)
|
||||
{
|
||||
int flags = m_scene.GetUserFlags(agentId);
|
||||
if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags))
|
||||
@@ -108,9 +108,9 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
|
||||
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(
|
||||
"[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,
|
||||
capsObjectPath, agentId, m_scene.RegionInfo.RegionName);
|
||||
|
||||
m_capsObjects[agentId] = caps;
|
||||
m_capsObjects[circuitCode] = caps;
|
||||
|
||||
m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps);
|
||||
}
|
||||
|
||||
public void RemoveCaps(UUID agentId)
|
||||
public void RemoveCaps(UUID agentId, uint circuitCode)
|
||||
{
|
||||
if (childrenSeeds.ContainsKey(agentId))
|
||||
{
|
||||
@@ -139,11 +139,11 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
|
||||
lock (m_capsObjects)
|
||||
{
|
||||
if (m_capsObjects.ContainsKey(agentId))
|
||||
if (m_capsObjects.ContainsKey(circuitCode))
|
||||
{
|
||||
m_capsObjects[agentId].DeregisterHandlers();
|
||||
m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsObjects[agentId]);
|
||||
m_capsObjects.Remove(agentId);
|
||||
m_capsObjects[circuitCode].DeregisterHandlers();
|
||||
m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsObjects[circuitCode]);
|
||||
m_capsObjects.Remove(circuitCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -154,19 +154,30 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
}
|
||||
}
|
||||
|
||||
public Caps GetCapsForUser(UUID agentId)
|
||||
public Caps GetCapsForUser(uint circuitCode)
|
||||
{
|
||||
lock (m_capsObjects)
|
||||
{
|
||||
if (m_capsObjects.ContainsKey(agentId))
|
||||
if (m_capsObjects.ContainsKey(circuitCode))
|
||||
{
|
||||
return m_capsObjects[agentId];
|
||||
return m_capsObjects[circuitCode];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void ActivateCaps(uint circuitCode)
|
||||
{
|
||||
lock (m_capsObjects)
|
||||
{
|
||||
if (m_capsObjects.ContainsKey(circuitCode))
|
||||
{
|
||||
m_capsObjects[circuitCode].Activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAgentCapsSeeds(AgentCircuitData agent)
|
||||
{
|
||||
capsPaths[agent.AgentID] = agent.CapsPath;
|
||||
@@ -237,9 +248,9 @@ namespace OpenSim.Region.CoreModules.Framework
|
||||
StringBuilder caps = new StringBuilder();
|
||||
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(); )
|
||||
{
|
||||
|
||||
@@ -150,7 +150,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
{
|
||||
client.OnTeleportHomeRequest += TriggerTeleportHome;
|
||||
client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
|
||||
client.OnTeleportCancel += TeleportCancel;
|
||||
}
|
||||
|
||||
public virtual void Close() {}
|
||||
@@ -1020,11 +1019,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
return neighbourRegion;
|
||||
}
|
||||
|
||||
private void TeleportCancel(IClientAPI remoteClient)
|
||||
{
|
||||
m_entityTransferStateMachine.ResetFromTransit(remoteClient.AgentId);
|
||||
}
|
||||
|
||||
public bool Cross(ScenePresence agent, bool isFlying)
|
||||
{
|
||||
uint x;
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
public string url;
|
||||
public UUID urlcode;
|
||||
public Dictionary<UUID, RequestData> requests;
|
||||
public bool isSsl;
|
||||
}
|
||||
|
||||
public class RequestData
|
||||
@@ -195,6 +196,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
urlData.engine = engine;
|
||||
urlData.url = url;
|
||||
urlData.urlcode = urlcode;
|
||||
urlData.isSsl = false;
|
||||
urlData.requests = new Dictionary<UUID, RequestData>();
|
||||
|
||||
m_UrlMap[url] = urlData;
|
||||
@@ -240,6 +242,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
urlData.engine = engine;
|
||||
urlData.url = url;
|
||||
urlData.urlcode = urlcode;
|
||||
urlData.isSsl = true;
|
||||
urlData.requests = new Dictionary<UUID, RequestData>();
|
||||
|
||||
|
||||
@@ -421,7 +424,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||
|
||||
private void RemoveUrl(UrlData data)
|
||||
{
|
||||
m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/");
|
||||
if (data.isSsl)
|
||||
m_HttpsServer.RemoveHTTPHandler("", "/lslhttps/"+data.urlcode.ToString()+"/");
|
||||
else
|
||||
m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/");
|
||||
}
|
||||
|
||||
private Hashtable NoEvents(UUID requestID, UUID sessionID)
|
||||
|
||||
Reference in New Issue
Block a user