[ros-diffs] [cwittich] 41133: check for an open connection before sending data to debugger

cwittich at svn.reactos.org cwittich at svn.reactos.org
Wed May 27 00:46:08 CEST 2009


Author: cwittich
Date: Wed May 27 02:46:07 2009
New Revision: 41133

URL: http://svn.reactos.org/svn/reactos?rev=41133&view=rev
Log:
check for an open connection before sending data to debugger

Modified:
    trunk/tools/reactosdbg/RosDBG/RawTraffic.cs

Modified: trunk/tools/reactosdbg/RosDBG/RawTraffic.cs
URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/RawTraffic.cs?rev=41133&r1=41132&r2=41133&view=diff
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/RawTraffic.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/RawTraffic.cs [iso-8859-1] Wed May 27 02:46:07 2009
@@ -69,21 +69,24 @@
 
         private void RawTrafficText_KeyPress(object sender, KeyPressEventArgs e)
         {
-            switch ((int)e.KeyChar)
+            if (mConnection.ConnectionMode != DebugConnection.Mode.ClosedMode)
             {
-                case 8: /* Backspace */
-                    if (InputLabel.Text.Length > 0)
-                        InputLabel.Text = InputLabel.Text.Substring(0, InputLabel.Text.Length -1);
-                    break;
-                case 13: /* Return */
-                    InputLabel.Text = "";
-                    break;
-                default:
-                    InputLabel.Text += e.KeyChar;
-                    break;
+                switch ((int)e.KeyChar)
+                {
+                    case 8: /* Backspace */
+                        if (InputLabel.Text.Length > 0)
+                            InputLabel.Text = InputLabel.Text.Substring(0, InputLabel.Text.Length - 1);
+                        break;
+                    case 13: /* Return */
+                        InputLabel.Text = "";
+                        break;
+                    default:
+                        InputLabel.Text += e.KeyChar;
+                        break;
+                }
+
+                mConnection.Debugger.Write("" + e.KeyChar);
             }
-
-            mConnection.Debugger.Write("" + e.KeyChar);
         }
 
         private void RawTrafficText_MouseUp(object sender, MouseEventArgs e)



More information about the Ros-diffs mailing list