From cdaed113872f0615a0d2864cc54064a4432054c6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 3 Sep 2015 18:39:08 +0100 Subject: at last we can login and see objects ( friends is dead and disable in scenepresence) --- OpenSim/Data/MySQL/MySQLFramework.cs | 29 +++--- OpenSim/Data/MySQL/MySQLSimulationData.cs | 101 ++++++++------------- OpenSim/Data/MySQL/MySQLUserAccountData.cs | 6 +- OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 1 - .../Data/MySQL/Resources/RegionStore.migrations | 4 - .../Data/MySQL/Resources/UserProfiles.migrations | 3 - .../Data/PGSQL/Resources/UserProfiles.migrations | 3 - .../Data/SQLite/Resources/UserProfiles.migrations | 12 +++ OpenSim/Framework/Communications/RestClient.cs | 8 +- OpenSim/Framework/Console/CommandConsole.cs | 2 +- .../Framework/Monitoring/SimExtraStatsCollector.cs | 8 +- .../HttpServer/PollServiceRequestManager.cs | 56 ++---------- OpenSim/Framework/VersionInfo.cs | 2 +- OpenSim/Framework/WebUtil.cs | 18 ++-- OpenSim/Region/Application/OpenSimBase.cs | 5 - .../Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | 4 +- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 12 +-- .../Linden/Caps/EventQueue/EventQueueHelper.cs | 2 +- .../Linden/Caps/WebFetchInvDescModule.cs | 3 +- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 20 ++-- .../MapImage/MapImageServiceModule.cs | 2 +- .../CoreModules/World/WorldMap/WorldMapModule.cs | 6 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 58 ++---------- .../Region/Framework/Scenes/SimStatsReporter.cs | 2 +- .../Connectors/Asset/AssetServicesConnector.cs | 2 +- 25 files changed, 117 insertions(+), 252 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs index a522912..34791cf 100644 --- a/OpenSim/Data/MySQL/MySQLFramework.cs +++ b/OpenSim/Data/MySQL/MySQLFramework.cs @@ -60,32 +60,31 @@ namespace OpenSim.Data.MySQL protected int ExecuteNonQuery(MySqlCommand cmd) { lock (m_dbLock) - using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { - dbcon.Open(); - cmd.Connection = dbcon; - - try + using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { - dbcon.Open(); - cmd.Connection = dbcon; - try { - return cmd.ExecuteNonQuery(); + dbcon.Open(); + cmd.Connection = dbcon; + + try + { + return cmd.ExecuteNonQuery(); + } + catch (Exception e) + { + m_log.Error(e.Message, e); + m_log.Error(Environment.StackTrace.ToString()); + return 0; + } } catch (Exception e) { m_log.Error(e.Message, e); - m_log.Error(Environment.StackTrace.ToString()); return 0; } } - catch (Exception e) - { - m_log.Error(e.Message, e); - return 0; - } } } } diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 549d129..a62d347 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -1089,42 +1089,43 @@ namespace OpenSim.Data.MySQL using (MySqlCommand cmd = dbcon.CreateCommand()) { cmd.CommandText = "replace into regionsettings (regionUUID, " + - "block_terraform, block_fly, allow_damage, " + - "restrict_pushing, allow_land_resell, " + - "allow_land_join_divide, block_show_in_search, " + - "agent_limit, object_bonus, maturity, " + - "disable_scripts, disable_collisions, " + - "disable_physics, terrain_texture_1, " + - "terrain_texture_2, terrain_texture_3, " + - "terrain_texture_4, elevation_1_nw, " + - "elevation_2_nw, elevation_1_ne, " + - "elevation_2_ne, elevation_1_se, " + - "elevation_2_se, elevation_1_sw, " + - "elevation_2_sw, water_height, " + - "terrain_raise_limit, terrain_lower_limit, " + - "use_estate_sun, fixed_sun, sun_position, " + - "covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " + - "sunvectorz, loaded_creation_datetime, " + - "loaded_creation_id, map_tile_ID, block_search, casino, " + - "TelehubObject, parcel_tile_ID) " + - "values (?RegionUUID, ?BlockTerraform, " + - "?BlockFly, ?AllowDamage, ?RestrictPushing, " + - "?AllowLandResell, ?AllowLandJoinDivide, " + - "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + - "?Maturity, ?DisableScripts, ?DisableCollisions, " + - "?DisablePhysics, ?TerrainTexture1, " + - "?TerrainTexture2, ?TerrainTexture3, " + - "?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " + - "?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " + - "?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " + - "?WaterHeight, ?TerrainRaiseLimit, " + - "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + - "?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " + - "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + - "?LoadedCreationDateTime, ?LoadedCreationID, " + - "?TerrainImageID, ?block_search, ?casino, " + - "?TelehubObject, ?ParcelImageID)"; - + "block_terraform, block_fly, allow_damage, " + + "restrict_pushing, allow_land_resell, " + + "allow_land_join_divide, block_show_in_search, " + + "agent_limit, object_bonus, maturity, " + + "disable_scripts, disable_collisions, " + + "disable_physics, terrain_texture_1, " + + "terrain_texture_2, terrain_texture_3, " + + "terrain_texture_4, elevation_1_nw, " + + "elevation_2_nw, elevation_1_ne, " + + "elevation_2_ne, elevation_1_se, " + + "elevation_2_se, elevation_1_sw, " + + "elevation_2_sw, water_height, " + + "terrain_raise_limit, terrain_lower_limit, " + + "use_estate_sun, fixed_sun, sun_position, " + + "covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " + + "sunvectorz, loaded_creation_datetime, " + + "loaded_creation_id, map_tile_ID, block_search, casino, " + + "TelehubObject, parcel_tile_ID) " + + "values (?RegionUUID, ?BlockTerraform, " + + "?BlockFly, ?AllowDamage, ?RestrictPushing, " + + "?AllowLandResell, ?AllowLandJoinDivide, " + + "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + + "?Maturity, ?DisableScripts, ?DisableCollisions, " + + "?DisablePhysics, ?TerrainTexture1, " + + "?TerrainTexture2, ?TerrainTexture3, " + + "?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " + + "?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " + + "?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " + + "?WaterHeight, ?TerrainRaiseLimit, " + + "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + + "?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " + + "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + + "?LoadedCreationDateTime, ?LoadedCreationID, " + + "?TerrainImageID, ?block_search, ?casino, " + + "?TelehubObject, ?ParcelImageID)"; + + FillRegionSettingsCommand(cmd, rs); ExecuteNonQuery(cmd); } @@ -1567,34 +1568,6 @@ namespace OpenSim.Data.MySQL } /// - /// - /// - /// - /// - private static Array SerializeTerrain(double[,] val, double[,] oldTerrain) - { - MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double)); - BinaryWriter bw = new BinaryWriter(str); - - // TODO: COMPATIBILITY - Add byte-order conversions - for (int x = 0; x < (int)Constants.RegionSize; x++) - for (int y = 0; y < (int)Constants.RegionSize; y++) - { - double height = 20.0; - if (oldTerrain != null) - height = oldTerrain[x, y]; - if (!double.IsNaN(val[x, y])) - height = val[x, y]; - if (height == 0.0) - height = double.Epsilon; - - bw.Write(height); - } - - return str.ToArray(); - } - - /// /// Fill the prim command with prim values /// /// diff --git a/OpenSim/Data/MySQL/MySQLUserAccountData.cs b/OpenSim/Data/MySQL/MySQLUserAccountData.cs index 4ff3175..59cfe70 100644 --- a/OpenSim/Data/MySQL/MySQLUserAccountData.cs +++ b/OpenSim/Data/MySQL/MySQLUserAccountData.cs @@ -71,14 +71,14 @@ namespace OpenSim.Data.MySQL if (words.Length == 1) { cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?search or LastName like ?search) and active=1", m_Realm); - cmd.Parameters.AddWithValue("?search", words[0] + "%"); + cmd.Parameters.AddWithValue("?search", "%" + words[0] + "%"); cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); } else { cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst and LastName like ?searchLast) and active=1", m_Realm); - cmd.Parameters.AddWithValue("?searchFirst", words[0] + "%"); - cmd.Parameters.AddWithValue("?searchLast", words[1] + "%"); + cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%"); + cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%"); cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); } diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index c241e90..295e131 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs @@ -914,7 +914,6 @@ namespace OpenSim.Data.MySQL using (MySqlCommand cmd = new MySqlCommand(query, dbcon)) { cmd.Parameters.AddWithValue("?Id", pref.UserId.ToString()); - using (MySqlDataReader reader = cmd.ExecuteReader()) { if (reader.HasRows) diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 738f5c2..097271a 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -939,7 +939,6 @@ ALTER TABLE prims ADD COLUMN AttachedPosY double default 0; ALTER TABLE prims ADD COLUMN AttachedPosZ double default 0; ALTER TABLE primshapes ADD COLUMN LastAttachPoint int(4) not null default '0'; COMMIT; -<<<<<<< HEAD :VERSION 50 #---- Change LandFlags to unsigned @@ -948,6 +947,3 @@ BEGIN; ALTER TABLE land CHANGE COLUMN LandFlags LandFlags int unsigned default null; COMMIT; - -======= ->>>>>>> avn/ubitvar diff --git a/OpenSim/Data/MySQL/Resources/UserProfiles.migrations b/OpenSim/Data/MySQL/Resources/UserProfiles.migrations index 3df9b9b..87e99fa 100644 --- a/OpenSim/Data/MySQL/Resources/UserProfiles.migrations +++ b/OpenSim/Data/MySQL/Resources/UserProfiles.migrations @@ -81,7 +81,6 @@ CREATE TABLE IF NOT EXISTS `userdata` ( commit; -<<<<<<< HEAD :VERSION 3 # ------------------------------- begin; CREATE TABLE IF NOT EXISTS `usersettings` ( @@ -97,5 +96,3 @@ commit; begin; ALTER TABLE userpicks ADD COLUMN gatekeeper varchar(255); commit; -======= ->>>>>>> avn/ubitvar diff --git a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations index a67107a..c1580b2 100644 --- a/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations +++ b/OpenSim/Data/PGSQL/Resources/UserProfiles.migrations @@ -81,7 +81,6 @@ CREATE TABLE userdata ( commit; -<<<<<<< HEAD :VERSION 3 # ------------------------------- begin; CREATE TABLE usersettings ( @@ -154,5 +153,3 @@ BEGIN; ALTER TABLE usersettings ALTER COLUMN imviaemail SET DATA TYPE boolean USING CASE WHEN false THEN false ELSE true END; COMMIT; -======= ->>>>>>> avn/ubitvar diff --git a/OpenSim/Data/SQLite/Resources/UserProfiles.migrations b/OpenSim/Data/SQLite/Resources/UserProfiles.migrations index 16581f6..207dde0 100644 --- a/OpenSim/Data/SQLite/Resources/UserProfiles.migrations +++ b/OpenSim/Data/SQLite/Resources/UserProfiles.migrations @@ -88,3 +88,15 @@ CREATE TABLE IF NOT EXISTS userdata ( commit; + +:VERSION 3 # ------------------------------- + +begin; +CREATE TABLE IF NOT EXISTS usersettings ( + useruuid char(36) NOT NULL, + imviaemail binary(1) NOT NULL, + visible binary(1) NOT NULL, + email varchar(254) NOT NULL, + PRIMARY KEY (useruuid) +) +commit; diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 7c89e6b..807222b 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -388,10 +388,6 @@ namespace OpenSim.Framework.Communications m_log.Error(string.Format("[REST CLIENT] Error fetching resource from server: {0} ", _request.Address.ToString()), e); } } - - if (_response != null) - _response.Close(); - return null; } @@ -417,7 +413,7 @@ namespace OpenSim.Framework.Communications _request = (HttpWebRequest) WebRequest.Create(buildUri()); _request.KeepAlive = false; _request.ContentType = "application/xml"; - _request.Timeout = 30000; + _request.Timeout = 90000; _request.Method = RequestMethod; _asyncException = null; _request.ContentLength = src.Length; @@ -476,8 +472,6 @@ namespace OpenSim.Framework.Communications } } - _response.Close(); - if (_response != null) _response.Close(); diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 851fbed..d908b68 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -83,7 +83,7 @@ namespace OpenSim.Framework.Console = "To enter an argument that contains spaces, surround the argument with double quotes.\nFor example, show object name \"My long object name\"\n"; public const string ItemHelpText -= @"For more information, type 'help' to get a list of all commands, += @"For more information, type 'help ' to get a list of all commands, or type help ' where is one of the following:"; /// diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs index e4df7ee..b0fdc81 100755 --- a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs @@ -281,10 +281,10 @@ namespace OpenSim.Framework.Monitoring activeScripts = stats.StatsBlock[19].StatValue; scriptLinesPerSecond = stats.StatsBlock[20].StatValue; m_frameDilation = stats.StatsBlock[22].StatValue; - m_usersLoggingIn = stats.StatsBlock[23].StatValue; - m_totalGeoPrims = stats.StatsBlock[24].StatValue; - m_totalMeshes = stats.StatsBlock[25].StatValue; - m_inUseThreads = stats.StatsBlock[26].StatValue; +// m_usersLoggingIn = stats.StatsBlock[23].StatValue; +// m_totalGeoPrims = stats.StatsBlock[24].StatValue; +// m_totalMeshes = stats.StatsBlock[25].StatValue; +// m_inUseThreads = stats.StatsBlock[26].StatValue; } /// diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index 571e8d8..0e4323a 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs @@ -44,25 +44,6 @@ namespace OpenSim.Framework.Servers.HttpServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - /// - /// Is the poll service request manager running? - /// - /// - /// Can be running either synchronously or asynchronously - /// - public bool IsRunning { get; private set; } - - /// - /// Is the poll service performing responses asynchronously (with its own threads) or synchronously (via - /// external calls)? - /// - public bool PerformResponsesAsync { get; private set; } - - /// - /// Number of responses actually processed and sent to viewer (or aborted due to error). - /// - public int ResponsesProcessed { get; private set; } - private readonly BaseHttpServer m_server; private Dictionary> m_bycontext; @@ -74,7 +55,7 @@ namespace OpenSim.Framework.Servers.HttpServer private Thread[] m_workerThreads; private Thread m_retrysThread; - private bool m_running = true; + private bool m_running = false; private int slowCount = 0; private SmartThreadPool m_threadPool; @@ -84,37 +65,9 @@ namespace OpenSim.Framework.Servers.HttpServer BaseHttpServer pSrv, bool performResponsesAsync, uint pWorkerThreadCount, int pTimeout) { m_server = pSrv; - PerformResponsesAsync = performResponsesAsync; m_WorkerThreadCount = pWorkerThreadCount; m_workerThreads = new Thread[m_WorkerThreadCount]; -/* - StatsManager.RegisterStat( - new Stat( - "QueuedPollResponses", - "Number of poll responses queued for processing.", - "", - "", - "httpserver", - m_server.Port.ToString(), - StatType.Pull, - MeasuresOfInterest.AverageChangeOverTime, - stat => stat.Value = m_requests.Count(), - StatVerbosity.Debug)); - - StatsManager.RegisterStat( - new Stat( - "ProcessedPollResponses", - "Number of poll responses processed.", - "", - "", - "httpserver", - m_server.Port.ToString(), - StatType.Pull, - MeasuresOfInterest.AverageChangeOverTime, - stat => stat.Value = ResponsesProcessed, - StatVerbosity.Debug)); -*/ PollServiceHttpRequestComparer preqCp = new PollServiceHttpRequestComparer(); m_bycontext = new Dictionary>(preqCp); @@ -127,10 +80,12 @@ namespace OpenSim.Framework.Servers.HttpServer startInfo.ThreadPoolName = "PoolService"; m_threadPool = new SmartThreadPool(startInfo); + } public void Start() { + m_running = true; m_threadPool.Start(); //startup worker threads for (uint i = 0; i < m_WorkerThreadCount; i++) @@ -154,12 +109,13 @@ namespace OpenSim.Framework.Servers.HttpServer true, null, 1000 * 60 * 10); + } private void ReQueueEvent(PollServiceHttpRequest req) { - if (IsRunning) + if (m_running) { lock (m_retryRequests) m_retryRequests.Enqueue(req); @@ -207,7 +163,7 @@ namespace OpenSim.Framework.Servers.HttpServer public void EnqueueInt(PollServiceHttpRequest req) { - if (IsRunning) + if (m_running) { if (req.PollServiceArgs.Type != PollServiceEventArgs.EventType.LongPoll) { diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index f0ea96f..165b2b4 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -29,7 +29,7 @@ namespace OpenSim { public class VersionInfo { - public const string VersionNumber = "0.8.2.0CM"; + public const string VersionNumber = "0.8.2.0"; private const Flavour VERSION_FLAVOUR = Flavour.Dev; public enum Flavour diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 44d9318..f834baa 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -86,7 +86,7 @@ namespace OpenSim.Framework /// Number of milliseconds a call can take before it is considered /// a "long" call for warning & debugging purposes /// - public const int LongCallTime = 500; + public const int LongCallTime = 3000; /// /// The maximum length of any data logged because of a long request time. @@ -418,7 +418,7 @@ namespace OpenSim.Framework /// public static OSDMap PostToService(string url, NameValueCollection data) { - return ServiceFormRequest(url,data, 20000); + return ServiceFormRequest(url,data, 30000); } public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) @@ -808,7 +808,7 @@ namespace OpenSim.Framework /// /// /// - /// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds) + /// Request timeout in seconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds) /// /// /// @@ -877,7 +877,7 @@ namespace OpenSim.Framework requestStream.Write(data, 0, length); // capture how much time was spent writing -// tickdata = Util.EnvironmentTickCountSubtract(tickstart); + tickdata = Util.EnvironmentTickCountSubtract(tickstart); request.BeginGetResponse(delegate(IAsyncResult ar) { @@ -992,9 +992,9 @@ namespace OpenSim.Framework } else if (WebUtil.DebugLevel >= 4) { - m_log.DebugFormat( - "[WEB UTIL]: HTTP OUT {0} took {1}ms", - reqnum, tickdiff); + m_log.DebugFormat("[LOGHTTP]: HTTP OUT {0} took {1}ms, {2}ms writing", + + reqnum, tickdiff, tickdata); } } finally @@ -1054,8 +1054,6 @@ namespace OpenSim.Framework { writer.Write(obj); writer.Flush(); - if (WebUtil.DebugLevel >= 5) - WebUtil.LogOutgoingDetail(buffer); } length = (int)obj.Length; @@ -1248,7 +1246,7 @@ namespace OpenSim.Framework auth.AddAuthorization(ht.Headers); if (pTimeout != 0) - ht.Timeout = pTimeout; + request.Timeout = pTimeout * 1000; if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections) ht.ServicePoint.ConnectionLimit = maxConnections; diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 5cd9045..9108e5d 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -281,11 +281,6 @@ namespace OpenSim // inserted them manually. LoadPlugins(); - if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! - { - Environment.Exit(1); - } - foreach (IApplicationPlugin plugin in m_plugins) plugin.PostInitialise(); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs index b735dfa..c241075 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs @@ -40,8 +40,8 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using Caps = OpenSim.Framework.Capabilities.Caps; -[assembly: Addin("LindenCaps", "0.1")] -[assembly: AddinDependency("OpenSim", "0.5")] +[assembly: Addin("LindenCaps", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] namespace OpenSim.Region.ClientStack.Linden { diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 5d50eba..feb3322 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -231,18 +231,12 @@ namespace OpenSim.Region.ClientStack.Linden lock (queue) queue.Enqueue(ev); } - else if (DebugLevel > 0) + else { - ScenePresence sp = m_scene.GetScenePresence(avatarID); - - // This assumes that an NPC should never have a queue. - if (sp != null && sp.PresenceType != PresenceType.Npc) - { OSDMap evMap = (OSDMap)ev; m_log.WarnFormat( - "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} {1} when placing message {2} in region {3}", - sp.Name, sp.UUID, evMap["message"], m_scene.Name); - } + "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}", + avatarID, evMap["message"], m_scene.Name); } } catch (NullReferenceException e) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 50e22f5..799ad0b 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs @@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.Linden llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(handle))); llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); - llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); + llsdSimInfo.Add("Port", OSD.FromInteger(endPoint.Port)); llsdSimInfo.Add("RegionSizeX", OSD.FromUInteger((uint)regionSizeX)); llsdSimInfo.Add("RegionSizeY", OSD.FromUInteger((uint)regionSizeY)); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 6e2f7f3..2a252e1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -118,8 +118,9 @@ namespace OpenSim.Region.ClientStack.Linden return; m_fetchInventoryDescendents2Url = config.GetString("Cap_FetchInventoryDescendents2", string.Empty); - m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); +// m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); +// if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty) if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty) { m_Enabled = true; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f76db1e..6df55a6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3864,6 +3864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) { +/* if (entity.UUID == m_agentId && !updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) { ImprovedTerseObjectUpdatePacket packet @@ -3874,27 +3875,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; packet.ObjectData[0] = CreateImprovedTerseBlock(entity, false); OutPacket(packet, ThrottleOutPacketType.Unknown, true); + return; } - - else if (entity is SceneObjectPart) +*/ + if (entity is SceneObjectPart) { SceneObjectPart e = (SceneObjectPart)entity; SceneObjectGroup g = e.ParentGroup; if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId) - return; // Don't send updates for other people's HUDs + return; // Don't send updates for other people's HUDs } - else - { - //double priority = m_prioritizer.GetUpdatePriority(this, entity); - uint priority = m_prioritizer.GetUpdatePriority(this, entity); + //double priority = m_prioritizer.GetUpdatePriority(this, entity); + uint priority = m_prioritizer.GetUpdatePriority(this, entity); - lock (m_entityUpdates.SyncRoot) - m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); - } + lock (m_entityUpdates.SyncRoot) + m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); } - /// /// Requeue an EntityUpdate when it was not acknowledged by the client. /// We will update the priority and put it in the correct queue, merging update flags diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index db3f900..5365b49 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage if (config == null) return; - int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime", "-1")); + int refreshminutes = Convert.ToInt32(config.GetString("RefreshTime", "60")); if (refreshminutes < 0) { m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Negative refresh time given in config. Module disabled."); diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index b6d96ac..adcad03 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -1426,7 +1426,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap using (Bitmap mapbmp = m_mapImageGenerator.CreateMapTile()) { GenerateMaptile(mapbmp); - m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); + if(m_mapImageServiceModule != null) + m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); } } @@ -1562,7 +1563,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap GenerateMaptile(mapbmp); // v2/3 (MapImageServiceModule) - m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); + if(m_mapImageServiceModule !=null) + m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 022a90d..4c346b7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -873,13 +873,7 @@ namespace OpenSim.Region.Framework.Scenes { uint x, y; Util.RegionHandleToRegionLoc(handle, out x, out y); -<<<<<<< HEAD - - if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) -======= -no information to check this // if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY,)) ->>>>>>> avn/ubitvar { old.Add(handle); } @@ -1158,6 +1152,8 @@ no information to check this { IsLoggingIn = false; } + + IsChildAgent = false; } m_log.DebugFormat("[MakeRootAgent] out lock: {0}ms", Util.EnvironmentTickCountSubtract(ts)); @@ -1172,9 +1168,7 @@ no information to check this Grouptitle = gm.GetGroupTitle(m_uuid); - AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode); - uint teleportFlags = (aCircuit == null) ? 0 : aCircuit.teleportFlags; - if ((teleportFlags & (uint)TeleportFlags.ViaHGLogin) != 0) + if ((m_teleportFlags & TeleportFlags.ViaHGLogin) != 0) { // The avatar is arriving from another grid. This means that we may have changed the // avatar's name to or from the special Hypergrid format ("First.Last @grid.example.com"). @@ -2031,8 +2025,8 @@ no information to check this if (!IsChildAgent && openChildAgents) { IFriendsModule friendsModule = m_scene.RequestModuleInterface(); - if (friendsModule != null) - friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); +// if (friendsModule != null) +// friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); m_log.DebugFormat("[CompleteMovement] friendsModule: {0}ms", Util.EnvironmentTickCountSubtract(ts)); @@ -2329,9 +2323,7 @@ no information to check this try { - // Don't slide against ground when crouching if camera is panned around avatar - if (Flying || DCF != Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN) - agent_control_v3 += Dir_Vectors[i]; + agent_control_v3 += Dir_Vectors[i]; //m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]); } catch (IndexOutOfRangeException) @@ -2751,44 +2743,6 @@ no information to check this SceneManager.Instance.TryGetScene(target_region.RegionID, out targetScene); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - float terrainHeight = (float)targetScene.Heightmap[(int)(pos.X % regionSize.X), (int)(pos.Y % regionSize.Y)]; // dont try to land underground terrainHeight += Appearance.AvatarHeight / 2; diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index bdddd73..e0030ec 100755 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -502,7 +502,7 @@ namespace OpenSim.Region.Framework.Scenes sb[22].StatID = (uint)Stats.SimSleepMs; sb[22].StatValue = sleeptime; - for (int i = 0; i < m_statisticArraySize; i++) + for (int i = 0; i < 23; i++) { lastReportedSimStats[i] = sb[i].StatValue; } diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 24f802e..a139b9b 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -482,7 +482,7 @@ namespace OpenSim.Services.Connectors try { newID = SynchronousRestObjectRequester. - MakeRequest("POST", uri, asset, 25); + MakeRequest("POST", uri, asset, 100); if (newID == null || newID == "") { newID = UUID.Zero.ToString(); -- cgit v1.1