From 0c6db79a8eabf5117c00edaaa2434630c7d7c877 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 29 Oct 2008 00:10:59 +0000 Subject: Mantis #2489 Thank you, Diva, for a patch that helps keep the list of sims to index clean by allowing sims to deregister. --- OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 6af6574..bca67eb 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -94,8 +94,6 @@ namespace OpenSim.Region.DataSnapshot #region IRegionModule - public void Close() {} - public void Initialise(Scene scene, IConfigSource config) { if (!m_configLoaded) { @@ -162,7 +160,7 @@ namespace OpenSim.Region.DataSnapshot MakeEverythingStale(); if (m_dataServices != "" && m_dataServices != "noservices") - NotifyDataServices(m_dataServices); + NotifyDataServices(m_dataServices, "online"); } } @@ -205,6 +203,14 @@ namespace OpenSim.Region.DataSnapshot } } + public void Close() + { + if (m_dataServices != "" && m_dataServices != "noservices") + NotifyDataServices(m_dataServices, "offline"); + + } + + public bool IsSharedModule { get { return true; } @@ -313,7 +319,7 @@ namespace OpenSim.Region.DataSnapshot #endregion #region External data services - private void NotifyDataServices(string servicesStr) + private void NotifyDataServices(string servicesStr, string serviceName) { Stream reply = null; string delimStr = ";"; @@ -325,6 +331,7 @@ namespace OpenSim.Region.DataSnapshot { string url = services[i].Trim(); RestClient cli = new RestClient(url); + cli.AddQueryParameter("service", serviceName); cli.AddQueryParameter("host", m_hostname); cli.AddQueryParameter("port", m_listener_port); cli.RequestMethod = "GET"; -- cgit v1.1