aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs50
1 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 0ac8cd7..983773a 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -70,7 +70,7 @@ namespace OpenSim
70 /// The file used to load and save an opensim archive if no filename has been specified 70 /// The file used to load and save an opensim archive if no filename has been specified
71 /// </summary> 71 /// </summary>
72 protected const string DEFAULT_OAR_BACKUP_FILENAME = "scene_oar.tar.gz"; 72 protected const string DEFAULT_OAR_BACKUP_FILENAME = "scene_oar.tar.gz";
73 73
74 /// <summary> 74 /// <summary>
75 /// The file to load and save inventory if no filename has been specified 75 /// The file to load and save inventory if no filename has been specified
76 /// </summary> 76 /// </summary>
@@ -161,7 +161,7 @@ namespace OpenSim
161 m_config = new OpenSimConfigSource(); 161 m_config = new OpenSimConfigSource();
162 m_config.Source = new IniConfigSource(); 162 m_config.Source = new IniConfigSource();
163 // IConfigSource icong; 163 // IConfigSource icong;
164 164
165 //check for .INI file (either default or name passed in command line) 165 //check for .INI file (either default or name passed in command line)
166 if (File.Exists(Application.iniFilePath)) 166 if (File.Exists(Application.iniFilePath))
167 { 167 {
@@ -338,7 +338,7 @@ namespace OpenSim
338 338
339 protected void LoadPlugins() 339 protected void LoadPlugins()
340 { 340 {
341 PluginLoader<IApplicationPlugin> loader = 341 PluginLoader<IApplicationPlugin> loader =
342 new PluginLoader<IApplicationPlugin> (new ApplicationPluginInitialiser (this)); 342 new PluginLoader<IApplicationPlugin> (new ApplicationPluginInitialiser (this));
343 343
344 loader.Load ("/OpenSim/Startup"); 344 loader.Load ("/OpenSim/Startup");
@@ -351,7 +351,7 @@ namespace OpenSim
351 public override void Startup() 351 public override void Startup()
352 { 352 {
353 base.Startup(); 353 base.Startup();
354 354
355 m_stats = StatsManager.StartCollectingSimExtraStats(); 355 m_stats = StatsManager.StartCollectingSimExtraStats();
356 356
357 // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) 357 // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false)
@@ -586,7 +586,7 @@ namespace OpenSim
586 public void handleRestartRegion(RegionInfo whichRegion) 586 public void handleRestartRegion(RegionInfo whichRegion)
587 { 587 {
588 m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager"); 588 m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager");
589 589
590 // Shutting down the client server 590 // Shutting down the client server
591 bool foundClientServer = false; 591 bool foundClientServer = false;
592 int clientServerElement = 0; 592 int clientServerElement = 0;
@@ -660,7 +660,7 @@ namespace OpenSim
660 } 660 }
661 661
662 #endregion 662 #endregion
663 663
664 /// <summary> 664 /// <summary>
665 /// Save inventory to a file. 665 /// Save inventory to a file.
666 /// </summary> 666 /// </summary>
@@ -668,49 +668,49 @@ namespace OpenSim
668 protected void SaveInv(string[] cmdparams) 668 protected void SaveInv(string[] cmdparams)
669 { 669 {
670 m_log.Error("[CONSOLE]: This command has not yet been implemented!"); 670 m_log.Error("[CONSOLE]: This command has not yet been implemented!");
671 671
672 if (cmdparams.Length < 3) 672 if (cmdparams.Length < 3)
673 { 673 {
674 m_log.Error("[CONSOLE]: usage is save-inv <first name> <last name> <inventory path> [<save file path>]"); 674 m_log.Error("[CONSOLE]: usage is save-inv <first name> <last name> <inventory path> [<save file path>]");
675 return; 675 return;
676 } 676 }
677 677
678 string firstName = cmdparams[0]; 678 string firstName = cmdparams[0];
679 string lastName = cmdparams[1]; 679 string lastName = cmdparams[1];
680 string invPath = cmdparams[2]; 680 string invPath = cmdparams[2];
681 //string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME); 681 //string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
682 682
683 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(firstName, lastName); 683 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(firstName, lastName);
684 if (null == userProfile) 684 if (null == userProfile)
685 { 685 {
686 m_log.ErrorFormat("[CONSOLE]: Failed to find user {0} {1}", firstName, lastName); 686 m_log.ErrorFormat("[CONSOLE]: Failed to find user {0} {1}", firstName, lastName);
687 return; 687 return;
688 } 688 }
689 689
690 CachedUserInfo userInfo = m_commsManager.UserProfileCacheService.GetUserDetails(userProfile.ID); 690 CachedUserInfo userInfo = m_commsManager.UserProfileCacheService.GetUserDetails(userProfile.ID);
691 if (null == userInfo) 691 if (null == userInfo)
692 { 692 {
693 m_log.ErrorFormat("[CONSOLE]: Failed to find user info for {0} {1} {2}", firstName, lastName, userProfile.ID); 693 m_log.ErrorFormat("[CONSOLE]: Failed to find user info for {0} {1} {2}", firstName, lastName, userProfile.ID);
694 return; 694 return;
695 } 695 }
696 696
697 InventoryFolderImpl inventoryFolder = null; 697 InventoryFolderImpl inventoryFolder = null;
698 InventoryItemBase inventoryItem = null; 698 InventoryItemBase inventoryItem = null;
699 699
700 if (userInfo.HasReceivedInventory) 700 if (userInfo.HasReceivedInventory)
701 { 701 {
702 // Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl 702 // Eliminate double slashes and any leading / on the path. This might be better done within InventoryFolderImpl
703 // itself (possibly at a small loss in efficiency). 703 // itself (possibly at a small loss in efficiency).
704 string[] components 704 string[] components
705 = invPath.Split(new string[] { InventoryFolderImpl.PATH_DELIMITER }, StringSplitOptions.RemoveEmptyEntries); 705 = invPath.Split(new string[] { InventoryFolderImpl.PATH_DELIMITER }, StringSplitOptions.RemoveEmptyEntries);
706 invPath = String.Empty; 706 invPath = String.Empty;
707 foreach (string c in components) 707 foreach (string c in components)
708 { 708 {
709 invPath += c + InventoryFolderImpl.PATH_DELIMITER; 709 invPath += c + InventoryFolderImpl.PATH_DELIMITER;
710 } 710 }
711 711
712 invPath = invPath.Remove(invPath.LastIndexOf(InventoryFolderImpl.PATH_DELIMITER)); 712 invPath = invPath.Remove(invPath.LastIndexOf(InventoryFolderImpl.PATH_DELIMITER));
713 713
714 // Annoyingly Split actually returns the original string if the input string consists only of delimiters 714 // Annoyingly Split actually returns the original string if the input string consists only of delimiters
715 // Therefore if we still start with a / after the split, then we need the root folder 715 // Therefore if we still start with a / after the split, then we need the root folder
716 if (invPath.StartsWith(InventoryFolderImpl.PATH_DELIMITER)) 716 if (invPath.StartsWith(InventoryFolderImpl.PATH_DELIMITER))
@@ -718,10 +718,10 @@ namespace OpenSim
718 inventoryFolder = userInfo.RootFolder; 718 inventoryFolder = userInfo.RootFolder;
719 } 719 }
720 else 720 else
721 { 721 {
722 inventoryFolder = userInfo.RootFolder.FindFolderByPath(invPath); 722 inventoryFolder = userInfo.RootFolder.FindFolderByPath(invPath);
723 } 723 }
724 724
725 // The path may point to an item instead 725 // The path may point to an item instead
726 if (inventoryFolder == null) 726 if (inventoryFolder == null)
727 { 727 {
@@ -733,7 +733,7 @@ namespace OpenSim
733 m_log.ErrorFormat("[CONSOLE]: Have not yet received inventory info for user {0} {1} {2}", firstName, lastName, userProfile.ID); 733 m_log.ErrorFormat("[CONSOLE]: Have not yet received inventory info for user {0} {1} {2}", firstName, lastName, userProfile.ID);
734 return; 734 return;
735 } 735 }
736 736
737 if (null != inventoryFolder) 737 if (null != inventoryFolder)
738 { 738 {
739 m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath); 739 m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath);
@@ -746,8 +746,8 @@ namespace OpenSim
746 { 746 {
747 m_log.ErrorFormat("[CONSOLE]: Could not find inventory entry at path {0}", invPath); 747 m_log.ErrorFormat("[CONSOLE]: Could not find inventory entry at path {0}", invPath);
748 return; 748 return;
749 } 749 }
750 } 750 }
751 751
752 /// <summary> 752 /// <summary>
753 /// Performs any last-minute sanity checking and shuts down the region server 753 /// Performs any last-minute sanity checking and shuts down the region server