diff options
author | Melanie Thielker | 2014-08-23 19:38:08 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-08-23 19:38:08 +0200 |
commit | 1fc5dadc604daebd4aeaf6954ac64f45fdfc7a2f (patch) | |
tree | 1898e9eee54d9cfbddea03b50d1b2c7c577a07cc /OpenSim/ApplicationPlugins | |
parent | Fix a null ref that will cause an exception if a grid region doesnt' specify ... (diff) | |
download | opensim-SC-1fc5dadc604daebd4aeaf6954ac64f45fdfc7a2f.zip opensim-SC-1fc5dadc604daebd4aeaf6954ac64f45fdfc7a2f.tar.gz opensim-SC-1fc5dadc604daebd4aeaf6954ac64f45fdfc7a2f.tar.bz2 opensim-SC-1fc5dadc604daebd4aeaf6954ac64f45fdfc7a2f.tar.xz |
Add an admin message to refesh a region's map tile. Will be used to periodically
rebuild the world map to clean out unused tiles.
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index e50dac6..d2a5c43 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -164,6 +164,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
164 | 164 | ||
165 | // Misc | 165 | // Misc |
166 | availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch); | 166 | availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch); |
167 | availableMethods["admin_refresh_map"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshMap); | ||
167 | availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion); | 168 | availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion); |
168 | 169 | ||
169 | // Either enable full remote functionality or just selected features | 170 | // Either enable full remote functionality or just selected features |
@@ -2048,6 +2049,32 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2048 | m_log.Info("[RADMIN]: Refresh Search Request complete"); | 2049 | m_log.Info("[RADMIN]: Refresh Search Request complete"); |
2049 | } | 2050 | } |
2050 | 2051 | ||
2052 | private void XmlRpcRefreshMap(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) | ||
2053 | { | ||
2054 | m_log.Info("[RADMIN]: Received Refresh Map Request"); | ||
2055 | |||
2056 | Hashtable responseData = (Hashtable)response.Value; | ||
2057 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
2058 | |||
2059 | CheckRegionParams(requestData, responseData); | ||
2060 | |||
2061 | Scene scene = null; | ||
2062 | GetSceneFromRegionParams(requestData, responseData, out scene); | ||
2063 | |||
2064 | IMapTileModule mapTileModule = scene.RequestModuleInterface<IMapTileModule>(); | ||
2065 | if (mapTileModule != null) | ||
2066 | { | ||
2067 | mapTileModule.UploadMapTile(scene); | ||
2068 | responseData["success"] = true; | ||
2069 | } | ||
2070 | else | ||
2071 | { | ||
2072 | responseData["success"] = false; | ||
2073 | } | ||
2074 | |||
2075 | m_log.Info("[RADMIN]: Refresh Map Request complete"); | ||
2076 | } | ||
2077 | |||
2051 | private void XmlRpcGetOpenSimVersion(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) | 2078 | private void XmlRpcGetOpenSimVersion(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) |
2052 | { | 2079 | { |
2053 | m_log.Info("[RADMIN]: Received Get OpenSim Version Request"); | 2080 | m_log.Info("[RADMIN]: Received Get OpenSim Version Request"); |