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)
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;
switch (saleType)

View File

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

View File

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

View File

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

View File

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