aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorMelanie2012-05-05 10:32:04 +0100
committerMelanie2012-05-05 10:32:04 +0100
commit31ab8b2fe0683cbc9fa4503c616722d678b66e33 (patch)
tree34fefd4bf9db7eea797db49e75aaaac5080ea94b /OpenSim/Services
parentMerge branch 'avination' (diff)
parentFire the scripting changed event with CHANGED_OWNER when an object that has c... (diff)
downloadopensim-SC_OLD-31ab8b2fe0683cbc9fa4503c616722d678b66e33.zip
opensim-SC_OLD-31ab8b2fe0683cbc9fa4503c616722d678b66e33.tar.gz
opensim-SC_OLD-31ab8b2fe0683cbc9fa4503c616722d678b66e33.tar.bz2
opensim-SC_OLD-31ab8b2fe0683cbc9fa4503c616722d678b66e33.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/WebUtil.cs OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs20
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs43
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs17
3 files changed, 71 insertions, 9 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 0e7a358..15156d0 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -52,6 +52,7 @@ namespace OpenSim.Services.InventoryService
52 : this(config, "InventoryService") 52 : this(config, "InventoryService")
53 { 53 {
54 } 54 }
55
55 public XInventoryService(IConfigSource config, string configName) : base(config) 56 public XInventoryService(IConfigSource config, string configName) : base(config)
56 { 57 {
57 if (configName != string.Empty) 58 if (configName != string.Empty)
@@ -364,6 +365,11 @@ namespace OpenSim.Services.InventoryService
364 // 365 //
365 public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs) 366 public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs)
366 { 367 {
368 return DeleteFolders(principalID, folderIDs, true);
369 }
370
371 public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs, bool onlyIfTrash)
372 {
367 if (!m_AllowDelete) 373 if (!m_AllowDelete)
368 return false; 374 return false;
369 375
@@ -371,11 +377,12 @@ namespace OpenSim.Services.InventoryService
371 // 377 //
372 foreach (UUID id in folderIDs) 378 foreach (UUID id in folderIDs)
373 { 379 {
374 if (!ParentIsTrash(id)) 380 if (onlyIfTrash && !ParentIsTrash(id))
375 continue; 381 continue;
382 //m_log.InfoFormat("[XINVENTORY SERVICE]: Delete folder {0}", id);
376 InventoryFolderBase f = new InventoryFolderBase(); 383 InventoryFolderBase f = new InventoryFolderBase();
377 f.ID = id; 384 f.ID = id;
378 PurgeFolder(f); 385 PurgeFolder(f, onlyIfTrash);
379 m_Database.DeleteFolders("folderID", id.ToString()); 386 m_Database.DeleteFolders("folderID", id.ToString());
380 } 387 }
381 388
@@ -384,10 +391,15 @@ namespace OpenSim.Services.InventoryService
384 391
385 public virtual bool PurgeFolder(InventoryFolderBase folder) 392 public virtual bool PurgeFolder(InventoryFolderBase folder)
386 { 393 {
394 return PurgeFolder(folder, true);
395 }
396
397 public virtual bool PurgeFolder(InventoryFolderBase folder, bool onlyIfTrash)
398 {
387 if (!m_AllowDelete) 399 if (!m_AllowDelete)
388 return false; 400 return false;
389 401
390 if (!ParentIsTrash(folder.ID)) 402 if (onlyIfTrash && !ParentIsTrash(folder.ID))
391 return false; 403 return false;
392 404
393 XInventoryFolder[] subFolders = m_Database.GetFolders( 405 XInventoryFolder[] subFolders = m_Database.GetFolders(
@@ -396,7 +408,7 @@ namespace OpenSim.Services.InventoryService
396 408
397 foreach (XInventoryFolder x in subFolders) 409 foreach (XInventoryFolder x in subFolders)
398 { 410 {
399 PurgeFolder(ConvertToOpenSim(x)); 411 PurgeFolder(ConvertToOpenSim(x), onlyIfTrash);
400 m_Database.DeleteFolders("folderID", x.folderID.ToString()); 412 m_Database.DeleteFolders("folderID", x.folderID.ToString());
401 } 413 }
402 414
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 2953cb5..a4b3cbd 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -231,7 +231,8 @@ namespace OpenSim.Services.LLLoginService
231 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, 231 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
232 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, 232 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
233 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, 233 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
234 GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency) 234 GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency,
235 string DSTZone)
235 : this() 236 : this()
236 { 237 {
237 FillOutInventoryData(invSkel, libService); 238 FillOutInventoryData(invSkel, libService);
@@ -260,7 +261,45 @@ namespace OpenSim.Services.LLLoginService
260 FillOutRegionData(destination); 261 FillOutRegionData(destination);
261 262
262 FillOutSeedCap(aCircuit, destination, clientIP); 263 FillOutSeedCap(aCircuit, destination, clientIP);
263 264
265 switch (DSTZone)
266 {
267 case "none":
268 DST = "N";
269 break;
270 case "local":
271 DST = TimeZone.CurrentTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
272 break;
273 default:
274 TimeZoneInfo dstTimeZone = null;
275 string[] tzList = DSTZone.Split(';');
276
277 foreach (string tzName in tzList)
278 {
279 try
280 {
281 dstTimeZone = TimeZoneInfo.FindSystemTimeZoneById(tzName);
282 }
283 catch
284 {
285 continue;
286 }
287 break;
288 }
289
290 if (dstTimeZone == null)
291 {
292 m_log.WarnFormat(
293 "[LLOGIN RESPONSE]: No valid timezone found for DST in {0}, falling back to system time.", tzList);
294 DST = TimeZone.CurrentTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
295 }
296 else
297 {
298 DST = dstTimeZone.IsDaylightSavingTime(DateTime.Now) ? "Y" : "N";
299 }
300
301 break;
302 }
264 } 303 }
265 304
266 private void FillOutInventoryData(List<InventoryFolderBase> invSkel, ILibraryService libService) 305 private void FillOutInventoryData(List<InventoryFolderBase> invSkel, ILibraryService libService)
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 891c452..06e05a9 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -82,6 +82,8 @@ namespace OpenSim.Services.LLLoginService
82 protected string m_AllowedClients; 82 protected string m_AllowedClients;
83 protected string m_DeniedClients; 83 protected string m_DeniedClients;
84 84
85 protected string m_DSTZone;
86
85 IConfig m_LoginServerConfig; 87 IConfig m_LoginServerConfig;
86// IConfig m_ClientsConfig; 88// IConfig m_ClientsConfig;
87 89
@@ -118,6 +120,8 @@ namespace OpenSim.Services.LLLoginService
118 m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); 120 m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty);
119 m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); 121 m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty);
120 122
123 m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time");
124
121 // Clean up some of these vars 125 // Clean up some of these vars
122 if (m_MapTileURL != String.Empty) 126 if (m_MapTileURL != String.Empty)
123 { 127 {
@@ -241,6 +245,7 @@ namespace OpenSim.Services.LLLoginService
241 245
242 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}", 246 m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}",
243 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); 247 firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0);
248
244 try 249 try
245 { 250 {
246 // 251 //
@@ -423,8 +428,11 @@ namespace OpenSim.Services.LLLoginService
423 // 428 //
424 // Finally, fill out the response and return it 429 // Finally, fill out the response and return it
425 // 430 //
426 LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, 431 LLLoginResponse response
427 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency); 432 = new LLLoginResponse(
433 account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
434 where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP,
435 m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone);
428 436
429 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); 437 m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
430 return response; 438 return response;
@@ -438,7 +446,10 @@ namespace OpenSim.Services.LLLoginService
438 } 446 }
439 } 447 }
440 448
441 protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags) 449 protected GridRegion FindDestination(
450 UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation,
451 GridRegion home, out GridRegion gatekeeper,
452 out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags)
442 { 453 {
443 flags = TeleportFlags.ViaLogin; 454 flags = TeleportFlags.ViaLogin;
444 455