aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2011-04-25 23:18:32 +0100
committerMelanie2011-04-25 23:18:32 +0100
commit9bf5e94b70c045e32e259f282c693c0fcea514a2 (patch)
tree71a6b6029d2cc74cf34fd5e09719f39f9f7a9422 /OpenSim
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentMade things consistent between LocalInventoryServiceConnector and RemoteXInve... (diff)
downloadopensim-SC_OLD-9bf5e94b70c045e32e259f282c693c0fcea514a2.zip
opensim-SC_OLD-9bf5e94b70c045e32e259f282c693c0fcea514a2.tar.gz
opensim-SC_OLD-9bf5e94b70c045e32e259f282c693c0fcea514a2.tar.bz2
opensim-SC_OLD-9bf5e94b70c045e32e259f282c693c0fcea514a2.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs4
-rw-r--r--OpenSim/Framework/RegionInfo.cs17
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs9
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs34
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs5
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs10
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs2
8 files changed, 60 insertions, 23 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index 52bcd55..be36cf2 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -592,9 +592,7 @@ namespace OpenSim.Framework.Console
592 string line = ReadLine(m_defaultPrompt + "# ", true, true); 592 string line = ReadLine(m_defaultPrompt + "# ", true, true);
593 593
594 if (line != String.Empty) 594 if (line != String.Empty)
595 { 595 Output("Invalid command");
596 m_log.Info("[CONSOLE] Invalid command");
597 }
598 } 596 }
599 597
600 public void RunCommand(string cmd) 598 public void RunCommand(string cmd)
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index d154bff..f4437e0 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -371,6 +371,7 @@ namespace OpenSim.Framework
371 private int m_physPrimMax = 0; 371 private int m_physPrimMax = 0;
372 private bool m_clampPrimSize = false; 372 private bool m_clampPrimSize = false;
373 private int m_objectCapacity = 0; 373 private int m_objectCapacity = 0;
374 private int m_agentCapacity = 0;
374 private string m_regionType = String.Empty; 375 private string m_regionType = String.Empty;
375 private RegionLightShareData m_windlight = new RegionLightShareData(); 376 private RegionLightShareData m_windlight = new RegionLightShareData();
376 protected uint m_httpPort; 377 protected uint m_httpPort;
@@ -549,6 +550,11 @@ namespace OpenSim.Framework
549 get { return m_objectCapacity; } 550 get { return m_objectCapacity; }
550 } 551 }
551 552
553 public int AgentCapacity
554 {
555 get { return m_agentCapacity; }
556 }
557
552 public byte AccessLevel 558 public byte AccessLevel
553 { 559 {
554 get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); } 560 get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); }
@@ -827,6 +833,8 @@ namespace OpenSim.Framework
827 833
828 m_objectCapacity = config.GetInt("MaxPrims", 15000); 834 m_objectCapacity = config.GetInt("MaxPrims", 15000);
829 835
836 m_agentCapacity = config.GetInt("MaxAgents", 100);
837
830 838
831 // Multi-tenancy 839 // Multi-tenancy
832 // 840 //
@@ -866,6 +874,9 @@ namespace OpenSim.Framework
866 if (m_objectCapacity != 0) 874 if (m_objectCapacity != 0)
867 config.Set("MaxPrims", m_objectCapacity); 875 config.Set("MaxPrims", m_objectCapacity);
868 876
877 if (m_agentCapacity != 0)
878 config.Set("MaxAgents", m_agentCapacity);
879
869 if (ScopeID != UUID.Zero) 880 if (ScopeID != UUID.Zero)
870 config.Set("ScopeID", ScopeID.ToString()); 881 config.Set("ScopeID", ScopeID.ToString());
871 882
@@ -952,6 +963,9 @@ namespace OpenSim.Framework
952 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, 963 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
953 "Max objects this sim will hold", m_objectCapacity.ToString(), true); 964 "Max objects this sim will hold", m_objectCapacity.ToString(), true);
954 965
966 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
967 "Max avatars this sim will hold", m_agentCapacity.ToString(), true);
968
955 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, 969 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
956 "Scope ID for this region", ScopeID.ToString(), true); 970 "Scope ID for this region", ScopeID.ToString(), true);
957 971
@@ -1067,6 +1081,9 @@ namespace OpenSim.Framework
1067 case "object_capacity": 1081 case "object_capacity":
1068 m_objectCapacity = (int)configuration_result; 1082 m_objectCapacity = (int)configuration_result;
1069 break; 1083 break;
1084 case "agent_capacity":
1085 m_agentCapacity = (int)configuration_result;
1086 break;
1070 case "scope_id": 1087 case "scope_id":
1071 ScopeID = (UUID)configuration_result; 1088 ScopeID = (UUID)configuration_result;
1072 break; 1089 break;
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index ce6ecf8..24758e8 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -29,7 +29,7 @@ namespace OpenSim
29{ 29{
30 public class VersionInfo 30 public class VersionInfo
31 { 31 {
32 private const string VERSION_NUMBER = "0.7.1"; 32 private const string VERSION_NUMBER = "0.7.2";
33 private const Flavour VERSION_FLAVOUR = Flavour.Dev; 33 private const Flavour VERSION_FLAVOUR = Flavour.Dev;
34 34
35 public enum Flavour 35 public enum Flavour
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index c7244c8..6dd871f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -182,9 +182,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
182 public InventoryCollection GetFolderContent(UUID userID, UUID folderID) 182 public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
183 { 183 {
184 InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); 184 InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID);
185 if (UserManager != null) 185 Util.FireAndForget(delegate
186 foreach (InventoryItemBase item in invCol.Items) 186 {
187 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); 187 if (UserManager != null)
188 foreach (InventoryItemBase item in invCol.Items)
189 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
190 });
188 191
189 return invCol; 192 return invCol;
190 } 193 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
index bd01bb9..8f1f257 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -46,10 +46,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
46 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private bool m_Enabled = false; 48 private bool m_Enabled = false;
49 private bool m_Initialized = false; 49 private Scene m_Scene;
50// private Scene m_Scene;
51 private XInventoryServicesConnector m_RemoteConnector; 50 private XInventoryServicesConnector m_RemoteConnector;
52 51
52 private IUserManagement m_UserManager;
53 private IUserManagement UserManager
54 {
55 get
56 {
57 if (m_UserManager == null)
58 {
59 m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>();
60 }
61 return m_UserManager;
62 }
63 }
64
53 public Type ReplaceableInterface 65 public Type ReplaceableInterface
54 { 66 {
55 get { return null; } 67 get { return null; }
@@ -114,12 +126,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
114 if (!m_Enabled) 126 if (!m_Enabled)
115 return; 127 return;
116 128
117 if (!m_Initialized)
118 {
119 m_Initialized = true;
120 }
121
122 scene.RegisterModuleInterface<IInventoryService>(this); 129 scene.RegisterModuleInterface<IInventoryService>(this);
130
131 if (m_Scene == null)
132 m_Scene = scene;
123 } 133 }
124 134
125 public void RemoveRegion(Scene scene) 135 public void RemoveRegion(Scene scene)
@@ -173,7 +183,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
173 183
174 public InventoryCollection GetFolderContent(UUID userID, UUID folderID) 184 public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
175 { 185 {
176 return m_RemoteConnector.GetFolderContent(userID, folderID); 186 InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID);
187 Util.FireAndForget(delegate
188 {
189 if (UserManager != null)
190 foreach (InventoryItemBase item in invCol.Items)
191 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
192 });
193
194 return invCol;
177 } 195 }
178 196
179 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) 197 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 598948a..7d5f109 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -127,7 +127,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
127 else 127 else
128 Scene.RegionInfo.RegionSettings.AllowLandResell = true; 128 Scene.RegionInfo.RegionSettings.AllowLandResell = true;
129 129
130 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; 130 if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity)
131 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
132 else
133 Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity;
131 134
132 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; 135 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
133 136
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
index cd9f2bf..a662abb 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
@@ -158,7 +158,10 @@ namespace OpenSim.Services.Connectors
158 public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) 158 public InventoryCollection GetFolderContent(UUID principalID, UUID folderID)
159 { 159 {
160 InventoryCollection inventory = new InventoryCollection(); 160 InventoryCollection inventory = new InventoryCollection();
161 161 inventory.Folders = new List<InventoryFolderBase>();
162 inventory.Items = new List<InventoryItemBase>();
163 inventory.UserID = principalID;
164
162 try 165 try
163 { 166 {
164 Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT", 167 Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT",
@@ -172,11 +175,6 @@ namespace OpenSim.Services.Connectors
172 if (ret.Count == 0) 175 if (ret.Count == 0)
173 return null; 176 return null;
174 177
175
176 inventory.Folders = new List<InventoryFolderBase>();
177 inventory.Items = new List<InventoryItemBase>();
178 inventory.UserID = principalID;
179
180 Dictionary<string,object> folders = 178 Dictionary<string,object> folders =
181 (Dictionary<string,object>)ret["FOLDERS"]; 179 (Dictionary<string,object>)ret["FOLDERS"];
182 Dictionary<string,object> items = 180 Dictionary<string,object> items =
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index e602412..0af35c8 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -244,7 +244,7 @@ namespace OpenSim.Services.InventoryService
244 // connector. So we disregard the principal and look 244 // connector. So we disregard the principal and look
245 // by ID. 245 // by ID.
246 // 246 //
247 m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString()); 247 //m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString());
248 InventoryCollection inventory = new InventoryCollection(); 248 InventoryCollection inventory = new InventoryCollection();
249 inventory.UserID = principalID; 249 inventory.UserID = principalID;
250 inventory.Folders = new List<InventoryFolderBase>(); 250 inventory.Folders = new List<InventoryFolderBase>();