opensim – Diff between revs 4 and 5

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 4 Rev 5
Line 47... Line 47...
47 /// </summary> 47 /// </summary>
48 public class AsyncCommandManager 48 public class AsyncCommandManager
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
Line 51... Line -...
51   -  
52 private static Thread cmdHandlerThread; 51  
53 private static int cmdHandlerThreadCycleSleepms; 52 private static int cmdHandlerThreadCycleSleepms;
Line 54... Line 53...
54 private static readonly System.Timers.Timer cmdEventTimer = new System.Timers.Timer(); 53 private static readonly System.Timers.Timer cmdEventTimer = new System.Timers.Timer();
55   54  
Line 169... Line 168...
169 if (!m_Listener.ContainsKey(m_ScriptEngine)) 168 if (!m_Listener.ContainsKey(m_ScriptEngine))
170 m_Listener[m_ScriptEngine] = new Listener(this); 169 m_Listener[m_ScriptEngine] = new Listener(this);
171 if (!m_SensorRepeat.ContainsKey(m_ScriptEngine)) 170 if (!m_SensorRepeat.ContainsKey(m_ScriptEngine))
172 m_SensorRepeat[m_ScriptEngine] = new SensorRepeat(this); 171 m_SensorRepeat[m_ScriptEngine] = new SensorRepeat(this);
173 if (!m_XmlRequest.ContainsKey(m_ScriptEngine)) 172 if (!m_XmlRequest.ContainsKey(m_ScriptEngine))
174 m_XmlRequest[m_ScriptEngine] = new XmlRequest(this); 173 m_XmlRequest[m_ScriptEngine] = new XmlRequest(this);
175   -  
176 StartThread(); -  
177 } -  
178 } -  
179   174  
180 private static void StartThread() -  
181 { -  
182 if (!cmdEventTimer.Enabled.Equals(false)) return; 175 if (cmdEventTimer.Enabled.Equals(true)) return;
183 // Start the timer event 176 // Start the timer
184 cmdEventTimer.Elapsed += (sender, args) => 177 cmdEventTimer.Elapsed += (sender, args) =>
185 { -  
186 try -  
187 { 178 {
-   179 try
-   180 {
188 DoOneCmdHandlerPass(); 181 DoOneCmdHandlerPass();
189 } 182 }
190 catch (Exception e) 183 catch (Exception e)
191 { 184 {
192 m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e); 185 m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e);
193 } 186 }
194 }; 187 };
195 cmdEventTimer.Interval = cmdHandlerThreadCycleSleepms; 188 cmdEventTimer.Interval = cmdHandlerThreadCycleSleepms;
196 cmdEventTimer.Enabled = true; 189 cmdEventTimer.Enabled = true;
-   190 }
197 } 191 }
Line 198... Line 192...
198   192  
199 private void ReadConfig() 193 private void ReadConfig()
200 { 194 {