diff options
author | Melanie | 2012-01-25 00:45:57 +0000 |
---|---|---|
committer | Melanie | 2012-01-25 00:45:57 +0000 |
commit | 427ab55058128c3cebd5ebd5e3aed93bc4337a2b (patch) | |
tree | e50bf3ef199b3aeb208ce3cabbd242e10e65c8ca /OpenSim/Region | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Make errors reported by OpenSim when it halts because it can't find certain c... (diff) | |
download | opensim-SC-427ab55058128c3cebd5ebd5e3aed93bc4337a2b.zip opensim-SC-427ab55058128c3cebd5ebd5e3aed93bc4337a2b.tar.gz opensim-SC-427ab55058128c3cebd5ebd5e3aed93bc4337a2b.tar.bz2 opensim-SC-427ab55058128c3cebd5ebd5e3aed93bc4337a2b.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneGraph.cs
Diffstat (limited to 'OpenSim/Region')
8 files changed, 57 insertions, 42 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 4a7c8b0..8d95c41 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -107,15 +107,13 @@ namespace OpenSim | |||
107 | } | 107 | } |
108 | else | 108 | else |
109 | { | 109 | { |
110 | m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); | 110 | m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath)); |
111 | Environment.Exit(1); | 111 | Environment.Exit(1); |
112 | } | 112 | } |
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | 116 | string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini"); | |
117 | string iniFileName = | ||
118 | startupConfig.GetString("inifile", "OpenSim.ini"); | ||
119 | 117 | ||
120 | if (IsUri(iniFileName)) | 118 | if (IsUri(iniFileName)) |
121 | { | 119 | { |
@@ -131,8 +129,7 @@ namespace OpenSim | |||
131 | if (!File.Exists(Application.iniFilePath)) | 129 | if (!File.Exists(Application.iniFilePath)) |
132 | { | 130 | { |
133 | iniFileName = "OpenSim.xml"; | 131 | iniFileName = "OpenSim.xml"; |
134 | Application.iniFilePath = Path.GetFullPath( | 132 | Application.iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), iniFileName)); |
135 | Path.Combine(Util.configDir(), iniFileName)); | ||
136 | } | 133 | } |
137 | 134 | ||
138 | if (File.Exists(Application.iniFilePath)) | 135 | if (File.Exists(Application.iniFilePath)) |
@@ -142,15 +139,12 @@ namespace OpenSim | |||
142 | } | 139 | } |
143 | } | 140 | } |
144 | 141 | ||
145 | string iniDirName = | 142 | string iniDirName = startupConfig.GetString("inidirectory", "config"); |
146 | startupConfig.GetString("inidirectory", "config"); | 143 | string iniDirPath = Path.Combine(Util.configDir(), iniDirName); |
147 | string iniDirPath = | ||
148 | Path.Combine(Util.configDir(), iniDirName); | ||
149 | 144 | ||
150 | if (Directory.Exists(iniDirPath)) | 145 | if (Directory.Exists(iniDirPath)) |
151 | { | 146 | { |
152 | m_log.InfoFormat("Searching folder {0} for config ini files", | 147 | m_log.InfoFormat("Searching folder {0} for config ini files", iniDirPath); |
153 | iniDirPath); | ||
154 | 148 | ||
155 | string[] fileEntries = Directory.GetFiles(iniDirName); | 149 | string[] fileEntries = Directory.GetFiles(iniDirName); |
156 | foreach (string filePath in fileEntries) | 150 | foreach (string filePath in fileEntries) |
@@ -172,7 +166,6 @@ namespace OpenSim | |||
172 | if (sources.Count == 0) | 166 | if (sources.Count == 0) |
173 | { | 167 | { |
174 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); | 168 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); |
175 | m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?"); | ||
176 | Environment.Exit(1); | 169 | Environment.Exit(1); |
177 | } | 170 | } |
178 | 171 | ||
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 9fdba92..df6a17b 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -211,16 +211,16 @@ namespace OpenSim | |||
211 | // Load the simulation data service | 211 | // Load the simulation data service |
212 | IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; | 212 | IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; |
213 | if (simDataConfig == null) | 213 | if (simDataConfig == null) |
214 | throw new Exception("Configuration file is missing the [SimulationDataStore] section"); | 214 | throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?"); |
215 | string module = simDataConfig.GetString("LocalServiceModule", String.Empty); | 215 | string module = simDataConfig.GetString("LocalServiceModule", String.Empty); |
216 | if (String.IsNullOrEmpty(module)) | 216 | if (String.IsNullOrEmpty(module)) |
217 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section"); | 217 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section."); |
218 | m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); | 218 | m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); |
219 | 219 | ||
220 | // Load the estate data service | 220 | // Load the estate data service |
221 | IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; | 221 | IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; |
222 | if (estateDataConfig == null) | 222 | if (estateDataConfig == null) |
223 | throw new Exception("Configuration file is missing the [EstateDataStore] section"); | 223 | throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?"); |
224 | module = estateDataConfig.GetString("LocalServiceModule", String.Empty); | 224 | module = estateDataConfig.GetString("LocalServiceModule", String.Empty); |
225 | if (String.IsNullOrEmpty(module)) | 225 | if (String.IsNullOrEmpty(module)) |
226 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); | 226 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index bf5b85a..3139112 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -492,6 +492,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
492 | if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60) | 492 | if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60) |
493 | { | 493 | { |
494 | m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); | 494 | m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); |
495 | StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); | ||
495 | 496 | ||
496 | RemoveClient(udpClient); | 497 | RemoveClient(udpClient); |
497 | return; | 498 | return; |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 7118f16..63dadb9 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -1250,6 +1250,24 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1250 | responsemap["7"] = responsearr; | 1250 | responsemap["7"] = responsearr; |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) | ||
1254 | { | ||
1255 | SceneObjectPart sop = m_scene.GetSceneObjectPart(m_scene.RegionInfo.RegionSettings.TelehubObject); | ||
1256 | |||
1257 | OSDArray responsearr = new OSDArray(); | ||
1258 | OSDMap responsemapdata = new OSDMap(); | ||
1259 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + sop.AbsolutePosition.X)); | ||
1260 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + sop.AbsolutePosition.Y)); | ||
1261 | // responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y)); | ||
1262 | responsemapdata["ID"] = OSD.FromUUID(sop.UUID); | ||
1263 | responsemapdata["Name"] = OSD.FromString(sop.Name); | ||
1264 | responsemapdata["Extra"] = OSD.FromInteger(0); // color (unused) | ||
1265 | responsemapdata["Extra2"] = OSD.FromInteger(0); // 0 = telehub / 1 = infohub | ||
1266 | responsearr.Add(responsemapdata); | ||
1267 | |||
1268 | responsemap["1"] = responsearr; | ||
1269 | } | ||
1270 | |||
1253 | return responsemap; | 1271 | return responsemap; |
1254 | } | 1272 | } |
1255 | 1273 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 6c57d57..c4dd655 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -66,12 +66,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
66 | protected internal event PhysicsCrash UnRecoverableError; | 66 | protected internal event PhysicsCrash UnRecoverableError; |
67 | private PhysicsCrash handlerPhysicsCrash = null; | 67 | private PhysicsCrash handlerPhysicsCrash = null; |
68 | 68 | ||
69 | public event ObjectDuplicateDelegate OnObjectDuplicate; | ||
70 | public event AttachToBackupDelegate OnAttachToBackup; | 69 | public event AttachToBackupDelegate OnAttachToBackup; |
71 | public event DetachFromBackupDelegate OnDetachFromBackup; | 70 | public event DetachFromBackupDelegate OnDetachFromBackup; |
72 | public event ChangedBackupDelegate OnChangeBackup; | 71 | public event ChangedBackupDelegate OnChangeBackup; |
73 | public event ObjectCreateDelegate OnObjectCreate; | ||
74 | public event ObjectDeleteDelegate OnObjectRemove; | ||
75 | 72 | ||
76 | #endregion | 73 | #endregion |
77 | 74 | ||
@@ -445,9 +442,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
445 | if (attachToBackup) | 442 | if (attachToBackup) |
446 | sceneObject.AttachToBackup(); | 443 | sceneObject.AttachToBackup(); |
447 | 444 | ||
448 | if (OnObjectCreate != null) | ||
449 | OnObjectCreate(sceneObject); | ||
450 | |||
451 | lock (SceneObjectGroupsByFullID) | 445 | lock (SceneObjectGroupsByFullID) |
452 | SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; | 446 | SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; |
453 | 447 | ||
@@ -496,9 +490,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
496 | if ((grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics) | 490 | if ((grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics) |
497 | RemovePhysicalPrim(grp.PrimCount); | 491 | RemovePhysicalPrim(grp.PrimCount); |
498 | } | 492 | } |
499 | |||
500 | if (OnObjectRemove != null) | ||
501 | OnObjectRemove(Entities[uuid]); | ||
502 | 493 | ||
503 | lock (SceneObjectGroupsByFullID) | 494 | lock (SceneObjectGroupsByFullID) |
504 | SceneObjectGroupsByFullID.Remove(grp.UUID); | 495 | SceneObjectGroupsByFullID.Remove(grp.UUID); |
@@ -2091,9 +2082,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2091 | // required for physics to update it's position | 2082 | // required for physics to update it's position |
2092 | copy.AbsolutePosition = copy.AbsolutePosition; | 2083 | copy.AbsolutePosition = copy.AbsolutePosition; |
2093 | 2084 | ||
2094 | if (OnObjectDuplicate != null) | ||
2095 | OnObjectDuplicate(original, copy); | ||
2096 | |||
2097 | return copy; | 2085 | return copy; |
2098 | } | 2086 | } |
2099 | } | 2087 | } |
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 95aa864..261029c 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
88 | (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); | 88 | (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); |
89 | 89 | ||
90 | scene.AddCommand( | 90 | scene.AddCommand( |
91 | this, "show image queues", | 91 | this, "image queues show", |
92 | "image queues show <first-name> <last-name>", | 92 | "image queues show <first-name> <last-name>", |
93 | "Show the image queues (textures downloaded via UDP) for a particular client.", | 93 | "Show the image queues (textures downloaded via UDP) for a particular client.", |
94 | (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); | 94 | (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); |
@@ -293,7 +293,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden | |||
293 | private string GetImageQueuesReport(string[] showParams) | 293 | private string GetImageQueuesReport(string[] showParams) |
294 | { | 294 | { |
295 | if (showParams.Length < 5 || showParams.Length > 6) | 295 | if (showParams.Length < 5 || showParams.Length > 6) |
296 | return "Usage: show image queues <first-name> <last-name> [full]"; | 296 | return "Usage: image queues show <first-name> <last-name> [full]"; |
297 | 297 | ||
298 | string firstName = showParams[3]; | 298 | string firstName = showParams[3]; |
299 | string lastName = showParams[4]; | 299 | string lastName = showParams[4]; |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 68999fc..c6e8286 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -134,9 +134,18 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
134 | | CollisionCategories.Body | 134 | | CollisionCategories.Body |
135 | | CollisionCategories.Character | 135 | | CollisionCategories.Character |
136 | | CollisionCategories.Land); | 136 | | CollisionCategories.Land); |
137 | internal IntPtr Body = IntPtr.Zero; | 137 | /// <summary> |
138 | /// Body for dynamics simulation | ||
139 | /// </summary> | ||
140 | internal IntPtr Body { get; private set; } | ||
141 | |||
138 | private OdeScene _parent_scene; | 142 | private OdeScene _parent_scene; |
139 | internal IntPtr Shell = IntPtr.Zero; | 143 | |
144 | /// <summary> | ||
145 | /// Collision geometry | ||
146 | /// </summary> | ||
147 | internal IntPtr Shell { get; private set; } | ||
148 | |||
140 | private IntPtr Amotor = IntPtr.Zero; | 149 | private IntPtr Amotor = IntPtr.Zero; |
141 | private d.Mass ShellMass; | 150 | private d.Mass ShellMass; |
142 | 151 | ||
@@ -1018,6 +1027,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1018 | /// <param name="tensor"></param> | 1027 | /// <param name="tensor"></param> |
1019 | private void CreateOdeStructures(float npositionX, float npositionY, float npositionZ, float tensor) | 1028 | private void CreateOdeStructures(float npositionX, float npositionY, float npositionZ, float tensor) |
1020 | { | 1029 | { |
1030 | if (!(Shell == IntPtr.Zero && Body == IntPtr.Zero && Amotor == IntPtr.Zero)) | ||
1031 | { | ||
1032 | m_log.ErrorFormat( | ||
1033 | "[ODE CHARACTER]: Creating ODE structures for {0} even though some already exist. Shell = {1}, Body = {2}, Amotor = {3}", | ||
1034 | Name, Shell, Body, Amotor); | ||
1035 | } | ||
1036 | |||
1021 | int dAMotorEuler = 1; | 1037 | int dAMotorEuler = 1; |
1022 | // _parent_scene.waitForSpaceUnlock(_parent_scene.space); | 1038 | // _parent_scene.waitForSpaceUnlock(_parent_scene.space); |
1023 | if (CAPSULE_LENGTH <= 0) | 1039 | if (CAPSULE_LENGTH <= 0) |
@@ -1135,6 +1151,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1135 | /// </summary> | 1151 | /// </summary> |
1136 | internal void DestroyOdeStructures() | 1152 | internal void DestroyOdeStructures() |
1137 | { | 1153 | { |
1154 | // Create avatar capsule and related ODE data | ||
1155 | if (Shell == IntPtr.Zero || Body == IntPtr.Zero || Amotor == IntPtr.Zero) | ||
1156 | { | ||
1157 | m_log.ErrorFormat( | ||
1158 | "[ODE CHARACTER]: Destroying ODE structures for {0} even though some are already null. Shell = {1}, Body = {2}, Amotor = {3}", | ||
1159 | Name, Shell, Body, Amotor); | ||
1160 | } | ||
1161 | |||
1138 | // destroy avatar capsule and related ODE data | 1162 | // destroy avatar capsule and related ODE data |
1139 | if (Amotor != IntPtr.Zero) | 1163 | if (Amotor != IntPtr.Zero) |
1140 | { | 1164 | { |
@@ -1260,15 +1284,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1260 | { | 1284 | { |
1261 | if (m_tainted_isPhysical) | 1285 | if (m_tainted_isPhysical) |
1262 | { | 1286 | { |
1263 | // Create avatar capsule and related ODE data | ||
1264 | if (!(Shell == IntPtr.Zero && Body == IntPtr.Zero && Amotor == IntPtr.Zero)) | ||
1265 | { | ||
1266 | m_log.Warn("[ODE CHARACTER]: re-creating the following avatar ODE data for " + Name + ", even though it already exists - " | ||
1267 | + (Shell!=IntPtr.Zero ? "Shell ":"") | ||
1268 | + (Body!=IntPtr.Zero ? "Body ":"") | ||
1269 | + (Amotor!=IntPtr.Zero ? "Amotor ":"")); | ||
1270 | } | ||
1271 | |||
1272 | CreateOdeStructures(_position.X, _position.Y, _position.Z, m_tensor); | 1287 | CreateOdeStructures(_position.X, _position.Y, _position.Z, m_tensor); |
1273 | _parent_scene.AddCharacter(this); | 1288 | _parent_scene.AddCharacter(this); |
1274 | } | 1289 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 228eca9..37daf46 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -1525,7 +1525,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1525 | chr.CollidingGround = false; | 1525 | chr.CollidingGround = false; |
1526 | chr.CollidingObj = false; | 1526 | chr.CollidingObj = false; |
1527 | 1527 | ||
1528 | // test the avatar's geometry for collision with the space | 1528 | // Test the avatar's geometry for collision with the space |
1529 | // This will return near and the space that they are the closest to | 1529 | // This will return near and the space that they are the closest to |
1530 | // And we'll run this again against the avatar and the space segment | 1530 | // And we'll run this again against the avatar and the space segment |
1531 | // This will return with a bunch of possible objects in the space segment | 1531 | // This will return with a bunch of possible objects in the space segment |