diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index ddc37edd85..6c0c74d1a8 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -341,14 +341,15 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController // Actually load it INonSharedRegionModule module = null; - try - { + + Type[] ctorParamTypes = new Type[ctorArgs.Length]; + for (int i = 0; i < ctorParamTypes.Length; i++) + ctorParamTypes[i] = ctorArgs[i].GetType(); + + if (node.Type.GetConstructor(ctorParamTypes) != null) module = (INonSharedRegionModule)Activator.CreateInstance(node.Type, ctorArgs); - } - catch - { + else module = (INonSharedRegionModule)Activator.CreateInstance(node.Type); - } // Check for replaceable interfaces Type replaceableInterface = module.ReplaceableInterface; diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index c07963cf51..a807948bde 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs @@ -66,22 +66,26 @@ namespace OpenSim.Data.MySQL Migration m = new Migration(m_Connection, assem, "RegionStore"); m.Update(); + // NOTE: This is a very slow query that times out on regions with a lot of prims. + // I'm told that it is no longer relevant so it's commented out now, but if it + // is relevant it should be added as a console command instead of part of the + // startup phase // Clean dropped attachments // - try - { - using (MySqlCommand cmd = m_Connection.CreateCommand()) - { - cmd.CommandText = "delete from prims, primshapes using prims " + - "left join primshapes on prims.uuid = primshapes.uuid " + - "where PCode = 9 and State <> 0"; - ExecuteNonQuery(cmd); - } - } - catch (MySqlException ex) - { - m_log.Error("[REGION DB]: Error cleaning up dropped attachments: " + ex.Message); - } + //try + //{ + // using (MySqlCommand cmd = m_Connection.CreateCommand()) + // { + // cmd.CommandText = "delete from prims, primshapes using prims " + + // "left join primshapes on prims.uuid = primshapes.uuid " + + // "where PCode = 9 and State <> 0"; + // ExecuteNonQuery(cmd); + // } + //} + //catch (MySqlException ex) + //{ + // m_log.Error("[REGION DB]: Error cleaning up dropped attachments: " + ex.Message); + //} } private IDataReader ExecuteReader(MySqlCommand c) diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 426ef29885..38986a28ff 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -154,7 +154,7 @@ namespace pCampBot client.Network.OnConnected += new NetworkManager.ConnectedCallback(this.Network_OnConnected); client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected); - client.Objects.OnNewPrim += Objects_NewPrim; + client.Objects.ObjectUpdate += Objects_NewPrim; //client.Assets.OnAssetReceived += Asset_ReceivedCallback; if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name")) { @@ -369,8 +369,10 @@ namespace pCampBot } } - public void Objects_NewPrim(Simulator simulator, Primitive prim, ulong regionHandle, ushort timeDilation) + public void Objects_NewPrim(object sender, PrimEventArgs args) { + Primitive prim = args.Prim; + if (prim != null) { if (prim.Textures != null) @@ -396,7 +398,6 @@ namespace pCampBot client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal, Asset_TextureCallback_Texture); } } - } diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index 3f9255e9e7..8b07942fcb 100644 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index 6cea1312a1..331d58b722 100644 Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ