diff options
author | Melanie | 2013-01-16 14:52:04 +0100 |
---|---|---|
committer | Melanie | 2013-01-16 14:52:04 +0100 |
commit | 451b6c0e82f0bf850c5e2da1aafbcd48d676dc52 (patch) | |
tree | 4ab69fa9ef847e0a00832527dfbb57cf9d9cf93c /OpenSim/ApplicationPlugins | |
parent | Add Refresh() Method to ISerachModule to allow forcing a sim to resend it's (diff) | |
download | opensim-SC-451b6c0e82f0bf850c5e2da1aafbcd48d676dc52.zip opensim-SC-451b6c0e82f0bf850c5e2da1aafbcd48d676dc52.tar.gz opensim-SC-451b6c0e82f0bf850c5e2da1aafbcd48d676dc52.tar.bz2 opensim-SC-451b6c0e82f0bf850c5e2da1aafbcd48d676dc52.tar.xz |
Add admin_refresh_search command to RemoteAdmin
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 3d80eb6..9f3844b 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -157,6 +157,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
157 | availableMethods["admin_acl_remove"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListRemove); | 157 | availableMethods["admin_acl_remove"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListRemove); |
158 | availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList); | 158 | availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList); |
159 | 159 | ||
160 | // Misc | ||
161 | availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch); | ||
162 | |||
160 | // Either enable full remote functionality or just selected features | 163 | // Either enable full remote functionality or just selected features |
161 | string enabledMethods = m_config.GetString("enabled_methods", "all"); | 164 | string enabledMethods = m_config.GetString("enabled_methods", "all"); |
162 | 165 | ||
@@ -1948,6 +1951,32 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1948 | responseData["success"] = true; | 1951 | responseData["success"] = true; |
1949 | } | 1952 | } |
1950 | 1953 | ||
1954 | private void XmlRpcRefreshSearch(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) | ||
1955 | { | ||
1956 | m_log.Info("[RADMIN]: Received Refresh Search Request"); | ||
1957 | |||
1958 | Hashtable responseData = (Hashtable)response.Value; | ||
1959 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
1960 | |||
1961 | CheckRegionParams(requestData, responseData); | ||
1962 | |||
1963 | Scene scene = null; | ||
1964 | GetSceneFromRegionParams(requestData, responseData, out scene); | ||
1965 | |||
1966 | ISearchModule searchModule = scene.RequestModuleInterface<ISearchModule>(); | ||
1967 | if (searchModule != null) | ||
1968 | { | ||
1969 | searchModule.Refresh(); | ||
1970 | responseData["success"] = true; | ||
1971 | } | ||
1972 | else | ||
1973 | { | ||
1974 | responseData["success"] = false; | ||
1975 | } | ||
1976 | |||
1977 | m_log.Info("[RADMIN]: Refresh Search Request complete"); | ||
1978 | } | ||
1979 | |||
1951 | /// <summary> | 1980 | /// <summary> |
1952 | /// Parse a float with the given parameter name from a request data hash table. | 1981 | /// Parse a float with the given parameter name from a request data hash table. |
1953 | /// </summary> | 1982 | /// </summary> |