Fix for upstream quagga: vtysh using #
[vpnservice.git] / bgpmanager / bgpmanager-impl / src / main / java / org / opendaylight / bgpmanager / VtyshCli.java
index faef7b4ca5f2d5dfb7ff28f7a536011a322f922f..743c012427702ef8eca9816ed05906896fd54b99 100644 (file)
@@ -126,7 +126,7 @@ public class VtyshCli extends OsgiCommandSupport {
         StringBuilder sb = new StringBuilder();
         int ip = 0, ret;
         StringBuilder temp, temp2;
-        char ch, gt = '>';
+        char ch, gt = '>', hashChar = '#';
 
         inputBgpCmd.append("show " + cmd);
 
@@ -187,8 +187,12 @@ public class VtyshCli extends OsgiCommandSupport {
                 socket.close();
                 return;
             }
-            if (ip == (int) gt) {
-                sb.append(gt);
+            if ((ip == (int) gt) || (ip == (int)hashChar)) {
+                if (ip == (int) gt) {
+                    sb.append(gt);
+                } else {
+                    sb.append(hashChar);
+                }
                 break;
             } else if (ip == -1) {
                 System.out.println(sb.toString());
@@ -215,7 +219,7 @@ public class VtyshCli extends OsgiCommandSupport {
                 socket.close();
                 return;
             }
-            if (ip == (int) gt) {
+            if ((ip == (int) gt) || (ip == (int) hashChar)) {
                 break;
             } else if (ip == -1) {
                 System.out.println(sb.toString());