aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-09-06 20:16:56 +0100
committerJustin Clark-Casey (justincc)2009-09-06 20:16:56 +0100
commit79c22651d7673b61a0c62786eb16f8b6433d6928 (patch)
treedb762de6bed694ac70c0262b5781ad8f76b4b329 /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
parentrefactor: replace some uses of iar module reference with scene instead (diff)
downloadopensim-SC_OLD-79c22651d7673b61a0c62786eb16f8b6433d6928.zip
opensim-SC_OLD-79c22651d7673b61a0c62786eb16f8b6433d6928.tar.gz
opensim-SC_OLD-79c22651d7673b61a0c62786eb16f8b6433d6928.tar.bz2
opensim-SC_OLD-79c22651d7673b61a0c62786eb16f8b6433d6928.tar.xz
refactor: use direct scene reference in inventory archive read request
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs20
1 files changed, 5 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 36e17b4..2c36270 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -69,19 +69,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
69 /// </value> 69 /// </value>
70 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 70 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
71 private Scene m_aScene; 71 private Scene m_aScene;
72
73 /// <value>
74 /// The comms manager we will use for all comms requests
75 /// </value>
76 protected internal CommunicationsManager CommsManager;
77 protected internal IAssetService AssetService;
78 72
79 public void Initialise(Scene scene, IConfigSource source) 73 public void Initialise(Scene scene, IConfigSource source)
80 { 74 {
81 if (m_scenes.Count == 0) 75 if (m_scenes.Count == 0)
82 { 76 {
83 scene.RegisterModuleInterface<IInventoryArchiverModule>(this); 77 scene.RegisterModuleInterface<IInventoryArchiverModule>(this);
84 CommsManager = scene.CommsManager;
85 OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted; 78 OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted;
86 79
87 scene.AddCommand( 80 scene.AddCommand(
@@ -99,11 +92,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
99 92
100 m_scenes[scene.RegionInfo.RegionID] = scene; 93 m_scenes[scene.RegionInfo.RegionID] = scene;
101 } 94 }
102 95
103 public void PostInitialise() 96 public void PostInitialise() {}
104 {
105 AssetService = m_aScene.AssetService;
106 }
107 97
108 public void Close() {} 98 public void Close() {}
109 99
@@ -150,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
150 if (userInfo != null) 140 if (userInfo != null)
151 { 141 {
152 InventoryArchiveReadRequest request = 142 InventoryArchiveReadRequest request =
153 new InventoryArchiveReadRequest(userInfo, invPath, loadStream, CommsManager, AssetService); 143 new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream);
154 UpdateClientWithLoadedNodes(userInfo, request.Execute()); 144 UpdateClientWithLoadedNodes(userInfo, request.Execute());
155 } 145 }
156 } 146 }
@@ -165,7 +155,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
165 if (userInfo != null) 155 if (userInfo != null)
166 { 156 {
167 InventoryArchiveReadRequest request = 157 InventoryArchiveReadRequest request =
168 new InventoryArchiveReadRequest(userInfo, invPath, loadPath, CommsManager, AssetService); 158 new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath);
169 UpdateClientWithLoadedNodes(userInfo, request.Execute()); 159 UpdateClientWithLoadedNodes(userInfo, request.Execute());
170 } 160 }
171 } 161 }
@@ -261,7 +251,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
261 /// <returns></returns> 251 /// <returns></returns>
262 protected CachedUserInfo GetUserInfo(string firstName, string lastName) 252 protected CachedUserInfo GetUserInfo(string firstName, string lastName)
263 { 253 {
264 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); 254 CachedUserInfo userInfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(firstName, lastName);
265 if (null == userInfo) 255 if (null == userInfo)
266 { 256 {
267 m_log.ErrorFormat( 257 m_log.ErrorFormat(