/// <summary> /// Add a new Caps Service for the given region if one does not already exist /// </summary> /// <param name = "regionHandle"></param> protected void AddCapsServiceForRegion(ulong regionHandle, string CAPSBase, AgentCircuitData circuitData, uint port) { if (m_clientEndPoint == null && circuitData.ClientIPEndPoint != null) { m_clientEndPoint = circuitData.ClientIPEndPoint; } if (m_clientEndPoint == null) { ///Should only happen in grid HG/OpenSim situtations IPAddress test = null; if (IPAddress.TryParse(circuitData.IPAddress, out test)) { m_clientEndPoint = new IPEndPoint(test, 0); //Dunno the port, so leave it alone } } if (!m_RegionCapsServices.ContainsKey(regionHandle)) { //Now add this client to the region caps //Create if needed m_CapsService.AddCapsForRegion(regionHandle); IRegionCapsService regionCaps = m_CapsService.GetCapsForRegion(regionHandle); PerRegionClientCapsService regionClient = new PerRegionClientCapsService(); regionClient.Initialise(this, regionCaps, CAPSBase, circuitData, port); m_RegionCapsServices[regionHandle] = regionClient; //Now get and add them regionCaps.AddClientToRegion(regionClient); } }
/// <summary> /// Add a new Caps Service for the given region if one does not already exist /// </summary> /// <param name="regionID"></param> /// <param name="capsBase"></param> /// <param name="circuitData"></param> /// <param name="port"></param> protected void AddCapsServiceForRegion(UUID regionID, string capsBase, AgentCircuitData circuitData, uint port) { if (!m_RegionCapsServices.ContainsKey(regionID)) { //Now add this client to the region caps //Create if needed m_CapsService.AddCapsForRegion(regionID); IRegionCapsService regionCaps = m_CapsService.GetCapsForRegion(regionID); PerRegionClientCapsService regionClient = new PerRegionClientCapsService(); regionClient.Initialize(this, regionCaps, capsBase, circuitData, port); m_RegionCapsServices [regionID] = regionClient; //Now get and add them regionCaps.AddClientToRegion(regionClient); } }
/// <summary> /// Add a new Caps Service for the given region if one does not already exist /// </summary> /// <param name="regionHandle"></param> protected void AddCapsServiceForRegion(ulong regionHandle, string CAPSBase, AgentCircuitData circuitData) { if (!m_RegionCapsServices.ContainsKey(regionHandle)) { //Now add this client to the region caps //Create if needed m_CapsService.AddCapsForRegion(regionHandle); IRegionCapsService regionCaps = m_CapsService.GetCapsForRegion(regionHandle); PerRegionClientCapsService regionClient = new PerRegionClientCapsService(); regionClient.Initialise(this, regionCaps, CAPSBase, circuitData); m_RegionCapsServices[regionHandle] = regionClient; //Now get and add them regionCaps.AddClientToRegion(regionClient); } }