aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 22:34:56 +1000
committerDavid Walter Seikel2016-11-03 22:34:56 +1000
commitf7116001946287bfc5904b72c0f88ca49d787d88 (patch)
treeb224222cc4170c0dd8699190d002806bfcd3da19
parentFix up lures. Maybe. (diff)
downloadopensim-SC_OLD-f7116001946287bfc5904b72c0f88ca49d787d88.zip
opensim-SC_OLD-f7116001946287bfc5904b72c0f88ca49d787d88.tar.gz
opensim-SC_OLD-f7116001946287bfc5904b72c0f88ca49d787d88.tar.bz2
opensim-SC_OLD-f7116001946287bfc5904b72c0f88ca49d787d88.tar.xz
Even OpenSim removed the silly IAR avatar presence check. Purge it with fire.
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs209
1 files changed, 70 insertions, 139 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 8847414..9c005e4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -50,11 +50,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 /// <value>
54 /// Enable or disable checking whether the iar user is actually logged in
55 /// </value>
56// public bool DisablePresenceChecks { get; set; }
57
58 public event InventoryArchiveSaved OnInventoryArchiveSaved; 53 public event InventoryArchiveSaved OnInventoryArchiveSaved;
59 public event InventoryArchiveLoaded OnInventoryArchiveLoaded; 54 public event InventoryArchiveLoaded OnInventoryArchiveLoaded;
60 55
@@ -94,11 +89,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
94 89
95 public InventoryArchiverModule() {} 90 public InventoryArchiverModule() {}
96 91
97// public InventoryArchiverModule(bool disablePresenceChecks)
98// {
99// DisablePresenceChecks = disablePresenceChecks;
100 // }
101
102 #region ISharedRegionModule 92 #region ISharedRegionModule
103 93
104 public void Initialise(IConfigSource source) 94 public void Initialise(IConfigSource source)
@@ -214,30 +204,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
214 204
215 if (userInfo != null) 205 if (userInfo != null)
216 { 206 {
217// if (CheckPresence(userInfo.PrincipalID)) 207 try
218// { 208 {
219 try 209 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService);
220 { 210 }
221 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService); 211 catch (EntryPointNotFoundException e)
222 } 212 {
223 catch (EntryPointNotFoundException e) 213 m_log.ErrorFormat(
224 { 214 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
225 m_log.ErrorFormat( 215 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
226 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." 216 m_log.Error(e);
227 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); 217
228 m_log.Error(e); 218 return false;
229 219 }
230 return false; 220
231 } 221 return true;
232
233 return true;
234// }
235// else
236// {
237// m_log.ErrorFormat(
238// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
239// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
240// }
241 } 222 }
242 } 223 }
243 224
@@ -257,30 +238,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
257 238
258 if (userInfo != null) 239 if (userInfo != null)
259 { 240 {
260// if (CheckPresence(userInfo.PrincipalID)) 241 try
261// { 242 {
262 try 243 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService);
263 { 244 }
264 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService); 245 catch (EntryPointNotFoundException e)
265 } 246 {
266 catch (EntryPointNotFoundException e) 247 m_log.ErrorFormat(
267 { 248 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
268 m_log.ErrorFormat( 249 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
269 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." 250 m_log.Error(e);
270 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); 251
271 m_log.Error(e); 252 return false;
272 253 }
273 return false; 254
274 } 255 return true;
275
276 return true;
277// }
278// else
279// {
280// m_log.ErrorFormat(
281// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
282// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
283// }
284 } 256 }
285 } 257 }
286 258
@@ -302,35 +274,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
302 274
303 if (userInfo != null) 275 if (userInfo != null)
304 { 276 {
305// if (CheckPresence(userInfo.PrincipalID)) 277 InventoryArchiveReadRequest request;
306// { 278 bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
307 InventoryArchiveReadRequest request; 279
308 bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); 280 try
309 281 {
310 try 282 request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadStream, merge);
311 { 283 }
312 request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadStream, merge); 284 catch (EntryPointNotFoundException e)
313 } 285 {
314 catch (EntryPointNotFoundException e) 286 m_log.ErrorFormat(
315 { 287 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
316 m_log.ErrorFormat( 288 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
317 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." 289 m_log.Error(e);
318 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); 290
319 m_log.Error(e); 291 return false;
320 292 }
321 return false; 293
322 } 294 UpdateClientWithLoadedNodes(userInfo, request.Execute());
323 295
324 UpdateClientWithLoadedNodes(userInfo, request.Execute()); 296 return true;
325
326 return true;
327// }
328// else
329// {
330// m_log.ErrorFormat(
331// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
332// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
333// }
334 } 297 }
335 else 298 else
336 m_log.ErrorFormat("[INVENTORY ARCHIVER]: User {0} {1} not found", 299 m_log.ErrorFormat("[INVENTORY ARCHIVER]: User {0} {1} not found",
@@ -350,35 +313,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
350 313
351 if (userInfo != null) 314 if (userInfo != null)
352 { 315 {
353// if (CheckPresence(userInfo.PrincipalID)) 316 InventoryArchiveReadRequest request;
354// { 317 bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
355 InventoryArchiveReadRequest request; 318
356 bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); 319 try
357 320 {
358 try 321 request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadPath, merge);
359 { 322 }
360 request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadPath, merge); 323 catch (EntryPointNotFoundException e)
361 } 324 {
362 catch (EntryPointNotFoundException e) 325 m_log.ErrorFormat(
363 { 326 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
364 m_log.ErrorFormat( 327 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
365 "[INVENTORY ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." 328 m_log.Error(e);
366 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); 329
367 m_log.Error(e); 330 return false;
368 331 }
369 return false; 332
370 } 333 UpdateClientWithLoadedNodes(userInfo, request.Execute());
371 334
372 UpdateClientWithLoadedNodes(userInfo, request.Execute()); 335 return true;
373
374 return true;
375// }
376// else
377// {
378// m_log.ErrorFormat(
379// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
380// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
381// }
382 } 336 }
383 } 337 }
384 338
@@ -615,28 +569,5 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
615 } 569 }
616 } 570 }
617 } 571 }
618
619// /// <summary>
620// /// Check if the given user is present in any of the scenes.
621// /// </summary>
622// /// <param name="userId">The user to check</param>
623// /// <returns>true if the user is in any of the scenes, false otherwise</returns>
624// protected bool CheckPresence(UUID userId)
625// {
626// if (DisablePresenceChecks)
627// return true;
628//
629// foreach (Scene scene in m_scenes.Values)
630// {
631// ScenePresence p;
632// if ((p = scene.GetScenePresence(userId)) != null)
633// {
634// p.ControllingClient.SendAgentAlertMessage("Inventory operation has been started", false);
635// return true;
636// }
637// }
638//
639// return false;
640// }
641 } 572 }
642} 573}