diff options
author | MW | 2007-11-16 13:39:11 +0000 |
---|---|---|
committer | MW | 2007-11-16 13:39:11 +0000 |
commit | 483377adaedefb12f19b3f843dbabfd7b545bf90 (patch) | |
tree | ceddc3cadc6d933e9964ad2ca2d694ca11452511 /OpenSim | |
parent | fixed some AssemblyInfo files (diff) | |
download | opensim-SC-483377adaedefb12f19b3f843dbabfd7b545bf90.zip opensim-SC-483377adaedefb12f19b3f843dbabfd7b545bf90.tar.gz opensim-SC-483377adaedefb12f19b3f843dbabfd7b545bf90.tar.bz2 opensim-SC-483377adaedefb12f19b3f843dbabfd7b545bf90.tar.xz |
More cleaning up when deleting regions from a instance. NOTE: IGridServices.DeregisterRegion() method needs implementing for grid mode.
Diffstat (limited to 'OpenSim')
8 files changed, 29 insertions, 17 deletions
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index 3d0af09..c1fb9c4 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs | |||
@@ -33,6 +33,7 @@ namespace OpenSim.Framework.Communications | |||
33 | public interface IGridServices | 33 | public interface IGridServices |
34 | { | 34 | { |
35 | RegionCommsListener RegisterRegion(RegionInfo regionInfos); | 35 | RegionCommsListener RegisterRegion(RegionInfo regionInfos); |
36 | bool DeregisterRegion(RegionInfo regionInfo); | ||
36 | List<SimpleRegionInfo> RequestNeighbours(uint x, uint y); | 37 | List<SimpleRegionInfo> RequestNeighbours(uint x, uint y); |
37 | RegionInfo RequestNeighbourInfo(ulong regionHandle); | 38 | RegionInfo RequestNeighbourInfo(ulong regionHandle); |
38 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); | 39 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 8d56222..c1df86c 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -773,7 +773,7 @@ namespace OpenSim | |||
773 | case "regions": | 773 | case "regions": |
774 | m_sceneManager.ForEachScene(delegate(Scene scene) | 774 | m_sceneManager.ForEachScene(delegate(Scene scene) |
775 | { | 775 | { |
776 | Console.WriteLine("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + scene.RegionInfo.RegionLocX + " , Region YLoc: " + scene.RegionInfo.RegionLocY); | 776 | m_log.Error("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + scene.RegionInfo.RegionLocX + " , Region YLoc: " + scene.RegionInfo.RegionLocY); |
777 | }); | 777 | }); |
778 | break; | 778 | break; |
779 | } | 779 | } |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 1e76813..5d4e702 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Communications.Local | |||
54 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) | 54 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) |
55 | { | 55 | { |
56 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); | 56 | //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); |
57 | if (!m_regions.ContainsKey((uint) regionInfo.RegionHandle)) | 57 | if (!m_regions.ContainsKey( regionInfo.RegionHandle)) |
58 | { | 58 | { |
59 | //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); | 59 | //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); |
60 | m_regions.Add(regionInfo.RegionHandle, regionInfo); | 60 | m_regions.Add(regionInfo.RegionHandle, regionInfo); |
@@ -69,6 +69,20 @@ namespace OpenSim.Region.Communications.Local | |||
69 | return null; | 69 | return null; |
70 | } | 70 | } |
71 | 71 | ||
72 | public bool DeregisterRegion(RegionInfo regionInfo) | ||
73 | { | ||
74 | if (m_regions.ContainsKey(regionInfo.RegionHandle)) | ||
75 | { | ||
76 | m_regions.Remove(regionInfo.RegionHandle); | ||
77 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | ||
78 | { | ||
79 | m_regionListeners.Remove(regionInfo.RegionHandle); | ||
80 | } | ||
81 | return true; | ||
82 | } | ||
83 | return false; | ||
84 | } | ||
85 | |||
72 | /// <summary> | 86 | /// <summary> |
73 | /// </summary> | 87 | /// </summary> |
74 | /// <param name="regionInfo"></param> | 88 | /// <param name="regionInfo"></param> |
@@ -132,7 +146,6 @@ namespace OpenSim.Region.Communications.Local | |||
132 | map.Y = (ushort) regInfo.RegionLocY; | 146 | map.Y = (ushort) regInfo.RegionLocY; |
133 | map.WaterHeight = (byte) regInfo.EstateSettings.waterHeight; | 147 | map.WaterHeight = (byte) regInfo.EstateSettings.waterHeight; |
134 | map.MapImageId = regInfo.EstateSettings.terrainImageID; | 148 | map.MapImageId = regInfo.EstateSettings.terrainImageID; |
135 | //new LLUUID("00000000-0000-0000-9999-000000000007"); | ||
136 | map.Agents = 1; | 149 | map.Agents = 1; |
137 | map.RegionFlags = 72458694; | 150 | map.RegionFlags = 72458694; |
138 | map.Access = 13; | 151 | map.Access = 13; |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 7ae95f1..c29dd41 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -112,6 +112,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
112 | return m_localBackend.RegisterRegion(regionInfo); | 112 | return m_localBackend.RegisterRegion(regionInfo); |
113 | } | 113 | } |
114 | 114 | ||
115 | public bool DeregisterRegion(RegionInfo regionInfo) | ||
116 | { | ||
117 | return false; | ||
118 | } | ||
119 | |||
115 | /// <summary> | 120 | /// <summary> |
116 | /// | 121 | /// |
117 | /// </summary> | 122 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index 98057f9..01a55fb 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs | |||
@@ -36,6 +36,10 @@ using OpenSim.Region.Environment.Scenes; | |||
36 | 36 | ||
37 | namespace OpenSim.Region.Environment.Modules | 37 | namespace OpenSim.Region.Environment.Modules |
38 | { | 38 | { |
39 | //this is first attempt to start breaking the mess thats called the assetcache up. | ||
40 | // basically this should be the texture sending (to clients) code moved out of assetcache | ||
41 | //and some small clean up | ||
42 | // but on first tests it didn't seem to work very well so is currently not in use. | ||
39 | public class TextureDownloadModule : IRegionModule | 43 | public class TextureDownloadModule : IRegionModule |
40 | { | 44 | { |
41 | private Scene m_scene; | 45 | private Scene m_scene; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 9bd55e1..4d4f78f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
43 | regionCommsHost.OnExpectUser -= NewUserConnection; | 43 | regionCommsHost.OnExpectUser -= NewUserConnection; |
44 | regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; | 44 | regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; |
45 | regionCommsHost.OnCloseAgentConnection -= CloseConnection; | 45 | regionCommsHost.OnCloseAgentConnection -= CloseConnection; |
46 | //regionCommsHost.RemoveRegion(m_regionInfo); //TODO add to method to commsManager | 46 | m_commsProvider.GridService.DeregisterRegion(m_regionInfo); |
47 | regionCommsHost = null; | 47 | regionCommsHost = null; |
48 | } | 48 | } |
49 | 49 | ||
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index caef883..87fa5cf 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -674,6 +674,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
674 | SendAnimPack(Animations.AnimsLLUUID["SIT"], 1); | 674 | SendAnimPack(Animations.AnimsLLUUID["SIT"], 1); |
675 | SendFullUpdateToAllClients(); | 675 | SendFullUpdateToAllClients(); |
676 | } | 676 | } |
677 | |||
677 | public void HandleSetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun) | 678 | public void HandleSetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun) |
678 | { | 679 | { |
679 | m_setAlwaysRun = SetAlwaysRun; | 680 | m_setAlwaysRun = SetAlwaysRun; |
@@ -683,6 +684,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
683 | } | 684 | } |
684 | 685 | ||
685 | } | 686 | } |
687 | |||
686 | protected void UpdateMovementAnimations(bool update_movementflag) | 688 | protected void UpdateMovementAnimations(bool update_movementflag) |
687 | { | 689 | { |
688 | if (update_movementflag) | 690 | if (update_movementflag) |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index e49e225..a9fb869 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -709,22 +709,9 @@ namespace OpenSim.DataStore.MonoSqlite | |||
709 | row["ProfileEnd"] = s.ProfileEnd; | 709 | row["ProfileEnd"] = s.ProfileEnd; |
710 | row["ProfileCurve"] = s.ProfileCurve; | 710 | row["ProfileCurve"] = s.ProfileCurve; |
711 | row["ProfileHollow"] = s.ProfileHollow; | 711 | row["ProfileHollow"] = s.ProfileHollow; |
712 | // text TODO: this isn't right] = but I'm not sure the right | ||
713 | // way to specify this as a blob atm | ||
714 | 712 | ||
715 | // And I couldn't work out how to save binary data either | ||
716 | // seems that the texture colum is being treated as a string in the Datarow | ||
717 | // if you do a .getType() on it, it returns string, while the other columns return correct type | ||
718 | // MW[10-08-07] | ||
719 | // Added following xml hack but not really ideal , also ExtraParams isn't currently part of the database | ||
720 | // am a bit worried about adding it now as some people will have old format databases, so for now including that data in this xml data | ||
721 | // MW[17-08-07] | ||
722 | row["Texture"] = s.TextureEntry; | 713 | row["Texture"] = s.TextureEntry; |
723 | row["ExtraParams"] = s.ExtraParams; | 714 | row["ExtraParams"] = s.ExtraParams; |
724 | // TextureBlock textureBlock = new TextureBlock(s.TextureEntry); | ||
725 | // textureBlock.ExtraParams = s.ExtraParams; | ||
726 | // System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); | ||
727 | // row["Texture"] = encoding.GetBytes(textureBlock.ToXMLString()); | ||
728 | } | 715 | } |
729 | 716 | ||
730 | private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) | 717 | private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) |