Compare commits

...

6 Commits

Author SHA1 Message Date
Melanie
96e8795382 Don't re-add the assembly resolver for each script if not creating the appdomain 2012-04-24 00:34:37 +01:00
Justin Clark-Casey (justincc)
487a6f3d15 Fix bug in WebStatsModule where an exception would always be output on update if the user teleported to another region on that simulator.
This was because update was looking for an existing stats record unique in session id, agent id and region id.
But if the user teleports to another region then region id changes.
WebStatsModule promptly doesn't find the existing record and tries to insert a new one, but only session id is the primary key and that's still the same, which makes things go bang.
This makes the update search only on the unique session id.
This is only an issue with simulators that have multiple regions where the webstats module is enabled.
2012-04-18 21:52:21 +01:00
Justin Clark-Casey (justincc)
906f6820c7 minor: Add some documentation to OnNewClient and OnClientClosed events 2012-04-18 21:46:04 +01:00
nebadon
8dea2c8e40 fix yield prolog so it compiles with mono 2.11 there has been a bugzilla
report files with mono project in regards to this change, this simply
lets us move forward with using mono 2.11 for now :
https://bugzilla.xamarin.com/show_bug.cgi?id=4052
2012-04-18 21:28:31 +01:00
Justin Clark-Casey (justincc)
de667ea00a Change flavour back to post fixes. 2012-03-31 01:31:45 +01:00
Justin Clark-Casey (justincc)
88b2247d94 Bump to 0.7.3.1 release version 2012-03-30 22:04:55 +01:00
6 changed files with 35 additions and 18 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenSim
{
public class VersionInfo
{
private const string VERSION_NUMBER = "0.7.3";
private const string VERSION_NUMBER = "0.7.3.1";
private const Flavour VERSION_FLAVOUR = Flavour.Post_Fixes;
public enum Flavour

View File

@@ -68,9 +68,11 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void OnNewClientDelegate(IClientAPI client);
/// <summary>
/// Deprecated in favour of OnClientConnect.
/// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
/// Triggered when a new client is added to the scene.
/// </summary>
/// <remarks>
/// Triggered before OnClientLogin.
/// </remarks>
public event OnNewClientDelegate OnNewClient;
/// <summary>
@@ -188,6 +190,12 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void ClientClosed(UUID clientID, Scene scene);
/// <summary>
/// Fired when a client is removed from a scene.
/// </summary>
/// <remarks>
/// At the point of firing, the scene still contains the client's scene presence.
/// </remarks>
public event ClientClosed OnClientClosed;
public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);

View File

@@ -226,7 +226,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
break;
}
}
int z = 0;
try
{
if (gotMatch)
@@ -235,8 +235,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
finally
{
// Manually finalize all the iterators.
for (int i = 0; i < nIterators; ++i)
iterators[i].Dispose();
for (z = 0; z < nIterators; ++z)
iterators[z].Dispose();
}
}
}

View File

@@ -576,7 +576,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
break;
}
}
int z = 0;
try
{
if (gotMatch)
@@ -585,8 +585,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
finally
{
// Manually finalize all the iterators.
for (int i = 0; i < nIterators; ++i)
iterators[i].Dispose();
for (z = 0; z < nIterators; ++z)
iterators[z].Dispose();
}
}

View File

@@ -1021,11 +1021,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
AppDomain sandbox;
if (m_AppDomainLoading)
{
sandbox = AppDomain.CreateDomain(
m_Scene.RegionInfo.RegionID.ToString(),
evidence, appSetup);
m_AppDomains[appDomain].AssemblyResolve +=
new ResolveEventHandler(
AssemblyResolver.OnAssemblyResolve);
}
else
{
sandbox = AppDomain.CurrentDomain;
}
//PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
//AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
@@ -1037,9 +1044,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
m_AppDomains[appDomain] = sandbox;
m_AppDomains[appDomain].AssemblyResolve +=
new ResolveEventHandler(
AssemblyResolver.OnAssemblyResolve);
m_DomainScripts[appDomain] = new List<UUID>();
}
catch (Exception e)
@@ -1970,4 +1974,4 @@ namespace OpenSim.Region.ScriptEngine.XEngine
// m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID);
}
}
}
}

View File

@@ -446,7 +446,7 @@ namespace OpenSim.Region.UserStatistics
{
// m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID);
UpdateUserStats(ParseViewerStats(request,agentID), dbConn);
UpdateUserStats(ParseViewerStats(request, agentID), dbConn);
return String.Empty;
}
@@ -654,8 +654,6 @@ namespace OpenSim.Region.UserStatistics
updatecmd.Parameters.Add(new SqliteParameter(":f_send_packet", uid.session_data.f_send_packet));
updatecmd.Parameters.Add(new SqliteParameter(":session_key", uid.session_data.session_id.ToString()));
updatecmd.Parameters.Add(new SqliteParameter(":agent_key", uid.session_data.agent_id.ToString()));
updatecmd.Parameters.Add(new SqliteParameter(":region_key", uid.session_data.region_id.ToString()));
// m_log.DebugFormat("[WEB STATS MODULE]: Database stats update for {0}", uid.session_data.agent_id);
@@ -667,11 +665,18 @@ namespace OpenSim.Region.UserStatistics
updatecmd.CommandText = SQL_STATS_TABLE_INSERT;
// StringBuilder parameters = new StringBuilder();
// SqliteParameterCollection spc = updatecmd.Parameters;
// foreach (SqliteParameter sp in spc)
// parameters.AppendFormat("{0}={1},", sp.ParameterName, sp.Value);
//
// m_log.DebugFormat("[WEB STATS MODULE]: Parameters {0}", parameters);
try
{
updatecmd.ExecuteNonQuery();
}
catch (Exception e)
catch (SqliteExecutionException e)
{
m_log.WarnFormat(
"[WEB STATS MODULE]: failed to write stats for {0}, storage Execution Exception {1}{2}",
@@ -801,7 +806,7 @@ set session_id=:session_id,
f_off_circuit=:f_off_circuit,
f_resent=:f_resent,
f_send_packet=:f_send_packet
WHERE session_id=:session_key AND agent_id=:agent_key AND region_id=:region_key";
WHERE session_id=:session_key";
#endregion
}