aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authormingchen2008-06-09 15:20:08 +0000
committermingchen2008-06-09 15:20:08 +0000
commitdb151bcec7843162c6dadf92afb1cf59957df943 (patch)
treede5769d913ee2f2f0429567a807e52f3ea82baca /OpenSim
parent*Patched CreateItemsTable.sql (MSSQL). Patch by Kyle and Chris from G2. (diff)
downloadopensim-SC_OLD-db151bcec7843162c6dadf92afb1cf59957df943.zip
opensim-SC_OLD-db151bcec7843162c6dadf92afb1cf59957df943.tar.gz
opensim-SC_OLD-db151bcec7843162c6dadf92afb1cf59957df943.tar.bz2
opensim-SC_OLD-db151bcec7843162c6dadf92afb1cf59957df943.tar.xz
*Fixed bug that caused failure when System.Console.Readline returns null (no stdin)
*Fixed bug that would crash the simulator if there were two physics/meshing engines loaded with the same name.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs12
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs14
2 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 5d8e5b9..c813e91 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -230,7 +230,14 @@ namespace OpenSim.Framework.Console
230 { 230 {
231 try 231 try
232 { 232 {
233 return System.Console.ReadLine(); 233 string line = System.Console.ReadLine();
234 while(line == null)
235 {
236
237 line = System.Console.ReadLine();
238 }
239
240 return line;
234 } 241 }
235 catch (Exception e) 242 catch (Exception e)
236 { 243 {
@@ -357,7 +364,8 @@ namespace OpenSim.Framework.Console
357 public void Prompt() 364 public void Prompt()
358 { 365 {
359 string tempstr = CmdPrompt(m_componentName + "# "); 366 string tempstr = CmdPrompt(m_componentName + "# ");
360 RunCommand(tempstr); 367 RunCommand(tempstr);
368
361 } 369 }
362 370
363 public void RunCommand(string cmdline) 371 public void RunCommand(string cmdline)
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
index 6a71581..4927cc5 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
@@ -130,8 +130,11 @@ namespace OpenSim.Region.Physics.Manager
130 IPhysicsPlugin plug = 130 IPhysicsPlugin plug =
131 (IPhysicsPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 131 (IPhysicsPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
132 plug.Init(); 132 plug.Init();
133 _PhysPlugins.Add(plug.GetName(), plug); 133 if(!_PhysPlugins.ContainsKey(plug.GetName()))
134 m_log.Info("[PHYSICS]: Added physics engine: " + plug.GetName()); 134 {
135 _PhysPlugins.Add(plug.GetName(), plug);
136 m_log.Info("[PHYSICS]: Added physics engine: " + plug.GetName());
137 }
135 } 138 }
136 139
137 Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true); 140 Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true);
@@ -140,8 +143,11 @@ namespace OpenSim.Region.Physics.Manager
140 { 143 {
141 IMeshingPlugin plug = 144 IMeshingPlugin plug =
142 (IMeshingPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 145 (IMeshingPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
143 _MeshPlugins.Add(plug.GetName(), plug); 146 if(!_MeshPlugins.ContainsKey(plug.GetName()))
144 m_log.Info("[PHYSICS]: Added meshing engine: " + plug.GetName()); 147 {
148 _MeshPlugins.Add(plug.GetName(), plug);
149 m_log.Info("[PHYSICS]: Added meshing engine: " + plug.GetName());
150 }
145 } 151 }
146 152
147 physTypeInterface = null; 153 physTypeInterface = null;