Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-10-02 19:51:43 +01:00
commit fd56fd2ce8
5 changed files with 56 additions and 26 deletions

View File

@ -114,18 +114,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
if (part.ParentGroup == null) if (part.ParentGroup == null)
return false; return false;
if (part.ObjectSaleType != saleType)
{
m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the type of sale specified");
return false;
}
if (part.SalePrice != salePrice)
{
m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the price specified");
return false;
}
SceneObjectGroup group = part.ParentGroup; SceneObjectGroup group = part.ParentGroup;
switch (saleType) switch (saleType)

View File

@ -572,8 +572,8 @@ namespace OpenSim.Region.Physics.OdePlugin
break; break;
case HollowShape.Circle: case HollowShape.Circle:
// Hollow shape is a perfect cyllinder in respect to the cube's scale // Hollow shape is a perfect cylinder in respect to the cube's scale
// Cyllinder hollow volume calculation // Cylinder hollow volume calculation
hollowVolume *= 0.1963495f * 3.07920140172638f; hollowVolume *= 0.1963495f * 3.07920140172638f;
break; break;

View File

@ -85,11 +85,13 @@ namespace OpenSim.Server.Base
argvConfig.AddSwitch("Startup", "logfile", "l"); argvConfig.AddSwitch("Startup", "logfile", "l");
argvConfig.AddSwitch("Startup", "inifile", "i"); argvConfig.AddSwitch("Startup", "inifile", "i");
argvConfig.AddSwitch("Startup", "prompt", "p"); argvConfig.AddSwitch("Startup", "prompt", "p");
argvConfig.AddSwitch("Startup", "logconfig", "g");
// Automagically create the ini file name // Automagically create the ini file name
// //
string fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location); string fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location);
string iniFile = fileName + ".ini"; string iniFile = fileName + ".ini";
string logConfig = null;
IConfig startupConfig = argvConfig.Configs["Startup"]; IConfig startupConfig = argvConfig.Configs["Startup"];
if (startupConfig != null) if (startupConfig != null)
@ -100,6 +102,9 @@ namespace OpenSim.Server.Base
// //
// Check if a prompt was given on the command line // Check if a prompt was given on the command line
prompt = startupConfig.GetString("prompt", prompt); prompt = startupConfig.GetString("prompt", prompt);
//
// Check for a Log4Net config file on the command line
logConfig =startupConfig.GetString("logconfig",logConfig);
} }
// Find out of the file name is a URI and remote load it // Find out of the file name is a URI and remote load it
@ -171,7 +176,15 @@ namespace OpenSim.Server.Base
OpenSimAppender consoleAppender = null; OpenSimAppender consoleAppender = null;
FileAppender fileAppender = null; FileAppender fileAppender = null;
XmlConfigurator.Configure(); if ( logConfig != null )
{
FileInfo cfg = new FileInfo(logConfig);
XmlConfigurator.Configure(cfg);
}
else
{
XmlConfigurator.Configure();
}
ILoggerRepository repository = LogManager.GetRepository(); ILoggerRepository repository = LogManager.GetRepository();
IAppender[] appenders = repository.GetAppenders(); IAppender[] appenders = repository.GetAppenders();
@ -207,11 +220,12 @@ namespace OpenSim.Server.Base
{ {
if (startupConfig != null) if (startupConfig != null)
{ {
string cfgFileName = startupConfig.GetString("logfile", null);
fileName = startupConfig.GetString("logfile", fileName+".log"); if (cfgFileName != null)
fileName = Path.GetFullPath(Path.Combine(".", fileName)); {
fileAppender.File = fileName; fileAppender.File = cfgFileName;
fileAppender.ActivateOptions(); fileAppender.ActivateOptions();
}
} }
} }

View File

@ -77,8 +77,23 @@ namespace OpenSim.Services.Connectors.SimianGrid
public SimianProfiles() { } public SimianProfiles() { }
public string Name { get { return "SimianProfiles"; } } public string Name { get { return "SimianProfiles"; } }
public void AddRegion(Scene scene) { if (m_Enabled) { CheckEstateManager(scene); scene.EventManager.OnClientConnect += ClientConnectHandler; } }
public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.EventManager.OnClientConnect -= ClientConnectHandler; } } public void AddRegion(Scene scene)
{
if (m_Enabled)
{
CheckEstateManager(scene);
scene.EventManager.OnClientConnect += ClientConnectHandler;
}
}
public void RemoveRegion(Scene scene)
{
if (m_Enabled)
{
scene.EventManager.OnClientConnect -= ClientConnectHandler;
}
}
#endregion INonSharedRegionModule #endregion INonSharedRegionModule
@ -89,13 +104,16 @@ namespace OpenSim.Services.Connectors.SimianGrid
public void Initialise(IConfigSource source) public void Initialise(IConfigSource source)
{ {
IConfig profileConfig = source.Configs["Profile"]; IConfig profileConfig = source.Configs["Profiles"];
if (profileConfig == null) if (profileConfig == null)
return; return;
if (profileConfig.GetString("Module", String.Empty) != Name) if (profileConfig.GetString("Module", String.Empty) != Name)
return; return;
m_log.DebugFormat("[SIMIAN PROFILES] module enabled");
m_Enabled = true;
IConfig gridConfig = source.Configs["UserAccountService"]; IConfig gridConfig = source.Configs["UserAccountService"];
if (gridConfig != null) if (gridConfig != null)
{ {
@ -265,6 +283,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
private void RequestAvatarPropertiesHandler(IClientAPI client, UUID avatarID) private void RequestAvatarPropertiesHandler(IClientAPI client, UUID avatarID)
{ {
m_log.DebugFormat("[SIMIAN PROFILES]: Request avatar properties for {0}",avatarID);
OSDMap user = FetchUserData(avatarID); OSDMap user = FetchUserData(avatarID);
ProfileFlags flags = ProfileFlags.AllowPublish | ProfileFlags.MaturePublish; ProfileFlags flags = ProfileFlags.AllowPublish | ProfileFlags.MaturePublish;
@ -274,8 +294,14 @@ namespace OpenSim.Services.Connectors.SimianGrid
OSDMap about = null; OSDMap about = null;
if (user.ContainsKey("LLAbout")) if (user.ContainsKey("LLAbout"))
{ {
try { about = OSDParser.DeserializeJson(user["LLAbout"].AsString()) as OSDMap; } try
catch { } {
about = OSDParser.DeserializeJson(user["LLAbout"].AsString()) as OSDMap;
}
catch
{
m_log.WarnFormat("[SIMIAN PROFILES]: Unable to decode LLAbout");
}
} }
if (about == null) if (about == null)
@ -428,6 +454,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
private OSDMap FetchUserData(UUID userID) private OSDMap FetchUserData(UUID userID)
{ {
m_log.DebugFormat("[SIMIAN PROFILES]: Fetch information about {0}",userID);
NameValueCollection requestArgs = new NameValueCollection NameValueCollection requestArgs = new NameValueCollection
{ {
{ "RequestMethod", "GetUser" }, { "RequestMethod", "GetUser" },

View File

@ -17,7 +17,7 @@
</appender> </appender>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender"> <appender name="LogFileAppender" type="log4net.Appender.FileAppender">
<file value="OpenSim.log" /> <file value="Robust.log" />
<appendToFile value="true" /> <appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %-5level - %logger %message%newline" /> <conversionPattern value="%date %-5level - %logger %message%newline" />