Author: pidster
Date: Wed Jun  8 21:58:24 2011
New Revision: 1133578

URL: http://svn.apache.org/viewvc?rev=1133578&view=rev
Log:
add disconnect to exit, set 1099 as port default, fix arg handling (closure -> 
array)

Modified:
    incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy

Modified: incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy
URL: 
http://svn.apache.org/viewvc/incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy?rev=1133578&r1=1133577&r2=1133578&view=diff
==============================================================================
--- incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy 
(original)
+++ incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy Wed 
Jun  8 21:58:24 2011
@@ -46,7 +46,7 @@ class CmdShell {
 
        static String HOST = "localhost"
 
-       static String PORT = "9024"
+       static String PORT = "1099"
 
        static Client client
 
@@ -123,7 +123,7 @@ class CmdShell {
                        input = params[0]
                }
                else {
-                       params = { input }
+                       params = [ input ] as String[]
                }
 
                if (commands.contains(input)) {
@@ -257,7 +257,7 @@ class CmdShell {
        static cmdDisconnect() {
                println "disconnecting..."
                if (client.getRemote()) {
-                       client.disconnect();
+                       client.disconnect()
                        if (!client.getRemote()) {
                                println "successfully disconnected from host"
                        }
@@ -268,6 +268,12 @@ class CmdShell {
        }
 
        static cmdExit() {
+        if (client.getRemote()) {
+            client.disconnect()
+            if (!client.getRemote()) {
+                println "successfully disconnected from host"
+            }
+        }
                println "exiting..."
                println "successfully exited kitty"
        }


Reply via email to