diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Region/OptionalModules/Asset | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Region/OptionalModules/Asset')
-rw-r--r-- | OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs index 7639c6c..906e1ee 100644 --- a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs | |||
@@ -50,36 +50,36 @@ namespace OpenSim.Region.OptionalModules.Asset | |||
50 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
52 | private Scene m_scene; | 52 | private Scene m_scene; |
53 | 53 | ||
54 | public string Name { get { return "Asset Information Module"; } } | 54 | public string Name { get { return "Asset Information Module"; } } |
55 | 55 | ||
56 | public Type ReplaceableInterface { get { return null; } } | 56 | public Type ReplaceableInterface { get { return null; } } |
57 | 57 | ||
58 | public void Initialise(IConfigSource source) | 58 | public void Initialise(IConfigSource source) |
59 | { | 59 | { |
60 | // m_log.DebugFormat("[ASSET INFO MODULE]: INITIALIZED MODULE"); | 60 | // m_log.DebugFormat("[ASSET INFO MODULE]: INITIALIZED MODULE"); |
61 | } | 61 | } |
62 | 62 | ||
63 | public void PostInitialise() | 63 | public void PostInitialise() |
64 | { | 64 | { |
65 | // m_log.DebugFormat("[ASSET INFO MODULE]: POST INITIALIZED MODULE"); | 65 | // m_log.DebugFormat("[ASSET INFO MODULE]: POST INITIALIZED MODULE"); |
66 | } | 66 | } |
67 | 67 | ||
68 | public void Close() | 68 | public void Close() |
69 | { | 69 | { |
70 | // m_log.DebugFormat("[ASSET INFO MODULE]: CLOSED MODULE"); | 70 | // m_log.DebugFormat("[ASSET INFO MODULE]: CLOSED MODULE"); |
71 | } | 71 | } |
72 | 72 | ||
73 | public void AddRegion(Scene scene) | 73 | public void AddRegion(Scene scene) |
74 | { | 74 | { |
75 | // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); | 75 | // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); |
76 | } | 76 | } |
77 | 77 | ||
78 | public void RemoveRegion(Scene scene) | 78 | public void RemoveRegion(Scene scene) |
79 | { | 79 | { |
80 | // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); | 80 | // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); |
81 | } | 81 | } |
82 | 82 | ||
83 | public void RegionLoaded(Scene scene) | 83 | public void RegionLoaded(Scene scene) |
84 | { | 84 | { |
85 | // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); | 85 | // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); |
@@ -118,27 +118,27 @@ namespace OpenSim.Region.OptionalModules.Asset | |||
118 | MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); | 118 | MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); |
119 | return; | 119 | return; |
120 | } | 120 | } |
121 | 121 | ||
122 | AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); | 122 | AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); |
123 | if (asset == null) | 123 | if (asset == null) |
124 | { | 124 | { |
125 | MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); | 125 | MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); |
126 | return; | 126 | return; |
127 | } | 127 | } |
128 | 128 | ||
129 | string fileName = rawAssetId; | 129 | string fileName = rawAssetId; |
130 | 130 | ||
131 | if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName)) | 131 | if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName)) |
132 | return; | 132 | return; |
133 | 133 | ||
134 | using (FileStream fs = new FileStream(fileName, FileMode.CreateNew)) | 134 | using (FileStream fs = new FileStream(fileName, FileMode.CreateNew)) |
135 | { | 135 | { |
136 | using (BinaryWriter bw = new BinaryWriter(fs)) | 136 | using (BinaryWriter bw = new BinaryWriter(fs)) |
137 | { | 137 | { |
138 | bw.Write(asset.Data); | 138 | bw.Write(asset.Data); |
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
142 | MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName); | 142 | MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName); |
143 | } | 143 | } |
144 | 144 | ||