aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
authorMelanie2012-01-06 00:08:18 +0000
committerMelanie2012-01-06 00:08:18 +0000
commitfdfc4ab2a8e171139caf9751a23eb75afe881c2b (patch)
treebc0d8d3066ecf5fe87e0778e23190d14a58d3bc1 /OpenSim/Services/Connectors
parentThat needs to be callable from elsewhere! (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-fdfc4ab2a8e171139caf9751a23eb75afe881c2b.zip
opensim-SC_OLD-fdfc4ab2a8e171139caf9751a23eb75afe881c2b.tar.gz
opensim-SC_OLD-fdfc4ab2a8e171139caf9751a23eb75afe881c2b.tar.bz2
opensim-SC_OLD-fdfc4ab2a8e171139caf9751a23eb75afe881c2b.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs39
1 files changed, 0 insertions, 39 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
index c3268d1..9bd04ed 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
@@ -89,7 +89,6 @@ namespace OpenSim.Services.Connectors
89 m_log.Error("[ASSET CONNECTOR]: No Server URI named in section AssetService"); 89 m_log.Error("[ASSET CONNECTOR]: No Server URI named in section AssetService");
90 throw new Exception("Asset connector init error"); 90 throw new Exception("Asset connector init error");
91 } 91 }
92 m_ServerURI = serviceURI;
93 92
94 MainConsole.Instance.Commands.AddCommand("asset", false, "dump asset", 93 MainConsole.Instance.Commands.AddCommand("asset", false, "dump asset",
95 "dump asset <id> <file>", 94 "dump asset <id> <file>",
@@ -461,43 +460,5 @@ namespace OpenSim.Services.Connectors
461 } 460 }
462 return false; 461 return false;
463 } 462 }
464
465 private void HandleDumpAsset(string module, string[] args)
466 {
467 if (args.Length != 4)
468 {
469 MainConsole.Instance.Output("Syntax: dump asset <id> <file>");
470 return;
471 }
472
473 UUID assetID;
474
475 if (!UUID.TryParse(args[2], out assetID))
476 {
477 MainConsole.Instance.Output("Invalid asset ID");
478 return;
479 }
480
481 if (m_Cache == null)
482 {
483 MainConsole.Instance.Output("Instance uses no cache");
484 return;
485 }
486
487 AssetBase asset = m_Cache.Get(assetID.ToString());
488
489 if (asset == null)
490 {
491 MainConsole.Instance.Output("Asset not found in cache");
492 return;
493 }
494
495 string fileName = args[3];
496
497 FileStream fs = File.Create(fileName);
498 fs.Write(asset.Data, 0, asset.Data.Length);
499
500 fs.Close();
501 }
502 } 463 }
503} 464}