aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorroot2011-07-05 04:01:59 +0100
committerroot2011-07-05 04:01:59 +0100
commit47cf9c8fe060af89cc14817dc762bcbfef956d5e (patch)
tree56b21e617bbb4ce3a613780c81178de41ff062d3 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parentAdd TestClearCache() (diff)
downloadopensim-SC-47cf9c8fe060af89cc14817dc762bcbfef956d5e.zip
opensim-SC-47cf9c8fe060af89cc14817dc762bcbfef956d5e.tar.gz
opensim-SC-47cf9c8fe060af89cc14817dc762bcbfef956d5e.tar.bz2
opensim-SC-47cf9c8fe060af89cc14817dc762bcbfef956d5e.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs41
1 files changed, 39 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 7529e01..ee3d7c5 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -2304,6 +2304,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2304 /// <description>UUID of the region</description></item> 2304 /// <description>UUID of the region</description></item>
2305 /// <item><term>region_name</term> 2305 /// <item><term>region_name</term>
2306 /// <description>region name</description></item> 2306 /// <description>region name</description></item>
2307 /// <item><term>merge</term>
2308 /// <description>true if oar should be merged</description></item>
2309 /// <item><term>skip-assets</term>
2310 /// <description>true if assets should be skiped</description></item>
2307 /// </list> 2311 /// </list>
2308 /// 2312 ///
2309 /// <code>region_uuid</code> takes precedence over 2313 /// <code>region_uuid</code> takes precedence over
@@ -2362,10 +2366,22 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2362 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2366 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2363 } 2367 }
2364 else throw new Exception("neither region_name nor region_uuid given"); 2368 else throw new Exception("neither region_name nor region_uuid given");
2369
2370 bool mergeOar = false;
2371 bool skipAssets = false;
2372
2373 if ((string)requestData["merge"] == "true")
2374 {
2375 mergeOar = true;
2376 }
2377 if ((string)requestData["skip-assets"] == "true")
2378 {
2379 skipAssets = true;
2380 }
2365 2381
2366 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); 2382 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
2367 if (archiver != null) 2383 if (archiver != null)
2368 archiver.DearchiveRegion(filename); 2384 archiver.DearchiveRegion(filename, mergeOar, skipAssets, Guid.Empty);
2369 else 2385 else
2370 throw new Exception("Archiver module not present for scene"); 2386 throw new Exception("Archiver module not present for scene");
2371 2387
@@ -2405,6 +2421,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2405 /// <description>UUID of the region</description></item> 2421 /// <description>UUID of the region</description></item>
2406 /// <item><term>region_name</term> 2422 /// <item><term>region_name</term>
2407 /// <description>region name</description></item> 2423 /// <description>region name</description></item>
2424 /// <item><term>profile</term>
2425 /// <description>profile url</description></item>
2426 /// <item><term>noassets</term>
2427 /// <description>true if no assets should be saved</description></item>
2408 /// </list> 2428 /// </list>
2409 /// 2429 ///
2410 /// <code>region_uuid</code> takes precedence over 2430 /// <code>region_uuid</code> takes precedence over
@@ -2462,12 +2482,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2462 } 2482 }
2463 else throw new Exception("neither region_name nor region_uuid given"); 2483 else throw new Exception("neither region_name nor region_uuid given");
2464 2484
2485 Dictionary<string, object> options = new Dictionary<string, object>();
2486
2487 //if (requestData.Contains("version"))
2488 //{
2489 // options["version"] = (string)requestData["version"];
2490 //}
2491
2492 if (requestData.Contains("profile"))
2493 {
2494 options["profile"] = (string)requestData["profile"];
2495 }
2496
2497 if (requestData["noassets"] == "true")
2498 {
2499 options["noassets"] = (string)requestData["noassets"] ;
2500 }
2501
2465 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); 2502 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
2466 2503
2467 if (archiver != null) 2504 if (archiver != null)
2468 { 2505 {
2469 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; 2506 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
2470 archiver.ArchiveRegion(filename, new Dictionary<string, object>()); 2507 archiver.ArchiveRegion(filename, options);
2471 lock (m_saveOarLock) Monitor.Wait(m_saveOarLock,5000); 2508 lock (m_saveOarLock) Monitor.Wait(m_saveOarLock,5000);
2472 scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted; 2509 scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted;
2473 } 2510 }