aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-10-02 19:51:43 +0100
committerMelanie2010-10-02 19:51:43 +0100
commitfd56fd2ce8884047885724a2f89df47398136db0 (patch)
treee0b6efa594c4d30315e8afa0b1a41e84975f16ad /OpenSim
parentReplace CalculateMass with a more accurate version, contributed by Ubit. (diff)
parentReapplying the parts of the prior revert that were not derived from the (diff)
downloadopensim-SC_OLD-fd56fd2ce8884047885724a2f89df47398136db0.zip
opensim-SC_OLD-fd56fd2ce8884047885724a2f89df47398136db0.tar.gz
opensim-SC_OLD-fd56fd2ce8884047885724a2f89df47398136db0.tar.bz2
opensim-SC_OLD-fd56fd2ce8884047885724a2f89df47398136db0.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs12
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs4
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs26
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs38
4 files changed, 55 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index a674d60..c06ccb2 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -114,18 +114,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
114 if (part.ParentGroup == null) 114 if (part.ParentGroup == null)
115 return false; 115 return false;
116 116
117 if (part.ObjectSaleType != saleType)
118 {
119 m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the type of sale specified");
120 return false;
121 }
122
123 if (part.SalePrice != salePrice)
124 {
125 m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the price specified");
126 return false;
127 }
128
129 SceneObjectGroup group = part.ParentGroup; 117 SceneObjectGroup group = part.ParentGroup;
130 118
131 switch (saleType) 119 switch (saleType)
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 319a951..f33b5b9 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -572,8 +572,8 @@ namespace OpenSim.Region.Physics.OdePlugin
572 break; 572 break;
573 573
574 case HollowShape.Circle: 574 case HollowShape.Circle:
575 // Hollow shape is a perfect cyllinder in respect to the cube's scale 575 // Hollow shape is a perfect cylinder in respect to the cube's scale
576 // Cyllinder hollow volume calculation 576 // Cylinder hollow volume calculation
577 577
578 hollowVolume *= 0.1963495f * 3.07920140172638f; 578 hollowVolume *= 0.1963495f * 3.07920140172638f;
579 break; 579 break;
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index dee31bd..18f0f24 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -85,11 +85,13 @@ namespace OpenSim.Server.Base
85 argvConfig.AddSwitch("Startup", "logfile", "l"); 85 argvConfig.AddSwitch("Startup", "logfile", "l");
86 argvConfig.AddSwitch("Startup", "inifile", "i"); 86 argvConfig.AddSwitch("Startup", "inifile", "i");
87 argvConfig.AddSwitch("Startup", "prompt", "p"); 87 argvConfig.AddSwitch("Startup", "prompt", "p");
88 argvConfig.AddSwitch("Startup", "logconfig", "g");
88 89
89 // Automagically create the ini file name 90 // Automagically create the ini file name
90 // 91 //
91 string fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location); 92 string fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location);
92 string iniFile = fileName + ".ini"; 93 string iniFile = fileName + ".ini";
94 string logConfig = null;
93 95
94 IConfig startupConfig = argvConfig.Configs["Startup"]; 96 IConfig startupConfig = argvConfig.Configs["Startup"];
95 if (startupConfig != null) 97 if (startupConfig != null)
@@ -100,6 +102,9 @@ namespace OpenSim.Server.Base
100 // 102 //
101 // Check if a prompt was given on the command line 103 // Check if a prompt was given on the command line
102 prompt = startupConfig.GetString("prompt", prompt); 104 prompt = startupConfig.GetString("prompt", prompt);
105 //
106 // Check for a Log4Net config file on the command line
107 logConfig =startupConfig.GetString("logconfig",logConfig);
103 } 108 }
104 109
105 // Find out of the file name is a URI and remote load it 110 // Find out of the file name is a URI and remote load it
@@ -171,7 +176,15 @@ namespace OpenSim.Server.Base
171 OpenSimAppender consoleAppender = null; 176 OpenSimAppender consoleAppender = null;
172 FileAppender fileAppender = null; 177 FileAppender fileAppender = null;
173 178
174 XmlConfigurator.Configure(); 179 if ( logConfig != null )
180 {
181 FileInfo cfg = new FileInfo(logConfig);
182 XmlConfigurator.Configure(cfg);
183 }
184 else
185 {
186 XmlConfigurator.Configure();
187 }
175 188
176 ILoggerRepository repository = LogManager.GetRepository(); 189 ILoggerRepository repository = LogManager.GetRepository();
177 IAppender[] appenders = repository.GetAppenders(); 190 IAppender[] appenders = repository.GetAppenders();
@@ -207,11 +220,12 @@ namespace OpenSim.Server.Base
207 { 220 {
208 if (startupConfig != null) 221 if (startupConfig != null)
209 { 222 {
210 223 string cfgFileName = startupConfig.GetString("logfile", null);
211 fileName = startupConfig.GetString("logfile", fileName+".log"); 224 if (cfgFileName != null)
212 fileName = Path.GetFullPath(Path.Combine(".", fileName)); 225 {
213 fileAppender.File = fileName; 226 fileAppender.File = cfgFileName;
214 fileAppender.ActivateOptions(); 227 fileAppender.ActivateOptions();
228 }
215 } 229 }
216 } 230 }
217 231
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
index 0ef4974..6aefc38 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
@@ -77,8 +77,23 @@ namespace OpenSim.Services.Connectors.SimianGrid
77 77
78 public SimianProfiles() { } 78 public SimianProfiles() { }
79 public string Name { get { return "SimianProfiles"; } } 79 public string Name { get { return "SimianProfiles"; } }
80 public void AddRegion(Scene scene) { if (m_Enabled) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } } 80
81 public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } 81 public void AddRegion(Scene scene)
82 {
83 if (m_Enabled)
84 {
85 CheckEstateManager(scene);
86 scene.EventManager.OnClientConnect += ClientConnectHandler;
87 }
88 }
89
90 public void RemoveRegion(Scene scene)
91 {
92 if (m_Enabled)
93 {
94 scene.EventManager.OnClientConnect -= ClientConnectHandler;
95 }
96 }
82 97
83 #endregion INonSharedRegionModule 98 #endregion INonSharedRegionModule
84 99
@@ -89,13 +104,16 @@ namespace OpenSim.Services.Connectors.SimianGrid
89 104
90 public void Initialise(IConfigSource source) 105 public void Initialise(IConfigSource source)
91 { 106 {
92 IConfig profileConfig = source.Configs["Profile"]; 107 IConfig profileConfig = source.Configs["Profiles"];
93 if (profileConfig == null) 108 if (profileConfig == null)
94 return; 109 return;
95 110
96 if (profileConfig.GetString("Module", String.Empty) != Name) 111 if (profileConfig.GetString("Module", String.Empty) != Name)
97 return; 112 return;
98 113
114 m_log.DebugFormat("[SIMIAN PROFILES] module enabled");
115 m_Enabled = true;
116
99 IConfig gridConfig = source.Configs["UserAccountService"]; 117 IConfig gridConfig = source.Configs["UserAccountService"];
100 if (gridConfig != null) 118 if (gridConfig != null)
101 { 119 {
@@ -265,6 +283,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
265 283
266 private void RequestAvatarPropertiesHandler(IClientAPI client, UUID avatarID) 284 private void RequestAvatarPropertiesHandler(IClientAPI client, UUID avatarID)
267 { 285 {
286 m_log.DebugFormat("[SIMIAN PROFILES]: Request avatar properties for {0}",avatarID);
287
268 OSDMap user = FetchUserData(avatarID); 288 OSDMap user = FetchUserData(avatarID);
269 289
270 ProfileFlags flags = ProfileFlags.AllowPublish | ProfileFlags.MaturePublish; 290 ProfileFlags flags = ProfileFlags.AllowPublish | ProfileFlags.MaturePublish;
@@ -274,8 +294,14 @@ namespace OpenSim.Services.Connectors.SimianGrid
274 OSDMap about = null; 294 OSDMap about = null;
275 if (user.ContainsKey("LLAbout")) 295 if (user.ContainsKey("LLAbout"))
276 { 296 {
277 try { about = OSDParser.DeserializeJson(user["LLAbout"].AsString()) as OSDMap; } 297 try
278 catch { } 298 {
299 about = OSDParser.DeserializeJson(user["LLAbout"].AsString()) as OSDMap;
300 }
301 catch
302 {
303 m_log.WarnFormat("[SIMIAN PROFILES]: Unable to decode LLAbout");
304 }
279 } 305 }
280 306
281 if (about == null) 307 if (about == null)
@@ -428,6 +454,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
428 454
429 private OSDMap FetchUserData(UUID userID) 455 private OSDMap FetchUserData(UUID userID)
430 { 456 {
457 m_log.DebugFormat("[SIMIAN PROFILES]: Fetch information about {0}",userID);
458
431 NameValueCollection requestArgs = new NameValueCollection 459 NameValueCollection requestArgs = new NameValueCollection
432 { 460 {
433 { "RequestMethod", "GetUser" }, 461 { "RequestMethod", "GetUser" },