Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim

cpu-performance
Melanie 2013-06-07 23:59:02 +01:00
commit 3a722ef81b
2 changed files with 30 additions and 1 deletions

View File

@ -71,6 +71,11 @@ namespace OpenSim.Region.ClientStack.Linden
private IInventoryService m_InventoryService; private IInventoryService m_InventoryService;
private ILibraryService m_LibraryService; private ILibraryService m_LibraryService;
private bool m_Enabled;
private string m_fetchInventoryDescendents2Url;
private string m_webFetchInventoryDescendentsUrl;
private static WebFetchInvDescHandler m_webFetchHandler; private static WebFetchInvDescHandler m_webFetchHandler;
private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>(); private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>();
@ -83,15 +88,32 @@ namespace OpenSim.Region.ClientStack.Linden
public void Initialise(IConfigSource source) public void Initialise(IConfigSource source)
{ {
IConfig config = source.Configs["ClientStack.LindenCaps"];
if (config == null)
return;
m_fetchInventoryDescendents2Url = config.GetString("Cap_FetchInventoryDescendents2", string.Empty);
m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty);
if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty)
{
m_Enabled = true;
}
} }
public void AddRegion(Scene s) public void AddRegion(Scene s)
{ {
if (!m_Enabled)
return;
m_scene = s; m_scene = s;
} }
public void RemoveRegion(Scene s) public void RemoveRegion(Scene s)
{ {
if (!m_Enabled)
return;
m_scene.EventManager.OnRegisterCaps -= RegisterCaps; m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps; m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps;
m_scene = null; m_scene = null;
@ -99,6 +121,9 @@ namespace OpenSim.Region.ClientStack.Linden
public void RegionLoaded(Scene s) public void RegionLoaded(Scene s)
{ {
if (!m_Enabled)
return;
m_InventoryService = m_scene.InventoryService; m_InventoryService = m_scene.InventoryService;
m_LibraryService = m_scene.LibraryService; m_LibraryService = m_scene.LibraryService;
@ -283,6 +308,9 @@ namespace OpenSim.Region.ClientStack.Linden
private void RegisterCaps(UUID agentID, Caps caps) private void RegisterCaps(UUID agentID, Caps caps)
{ {
if (m_fetchInventoryDescendents2Url == "")
return;
string capUrl = "/CAPS/" + UUID.Random() + "/"; string capUrl = "/CAPS/" + UUID.Random() + "/";
// Register this as a poll service // Register this as a poll service
@ -301,6 +329,7 @@ namespace OpenSim.Region.ClientStack.Linden
port = MainServer.Instance.SSLPort; port = MainServer.Instance.SSLPort;
protocol = "https"; protocol = "https";
} }
caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
m_capsDict[agentID] = capUrl; m_capsDict[agentID] = capUrl;

View File

@ -4828,7 +4828,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendForceClientSelectObjects(List<uint> ObjectIDs) public void SendForceClientSelectObjects(List<uint> ObjectIDs)
{ {
m_log.WarnFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count); // m_log.DebugFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count);
bool firstCall = true; bool firstCall = true;
const int MAX_OBJECTS_PER_PACKET = 251; const int MAX_OBJECTS_PER_PACKET = 251;