Fixed scanning of < and > operators in where clauses. #12
This commit is contained in:
parent
2e431894bf
commit
91b95e8466
|
|
@ -7,7 +7,7 @@ package examples;
|
|||
public class Config {
|
||||
|
||||
|
||||
public static final String HOST = "10.0.1.1";
|
||||
public static final String HOST = "10.0.1.134";
|
||||
public static final String USERNAME = "admin";
|
||||
public static final String PASSWORD = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package examples;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import me.legrange.mikrotik.MikrotikApiException;
|
||||
|
||||
/**
|
||||
* Example 7: Dump your complete config
|
||||
*
|
||||
* @author gideon
|
||||
*/
|
||||
public class Example8 extends Example {
|
||||
|
||||
public static void main(String... args) throws Exception {
|
||||
Example8 ex = new Example8();
|
||||
ex.connect();
|
||||
ex.test();
|
||||
ex.disconnect();
|
||||
}
|
||||
|
||||
private void test() throws MikrotikApiException, InterruptedException {
|
||||
List<Map<String, String>> res = con.execute("/ip/hotspot/user/print where uptime<00:00:01");
|
||||
for (Map<String, String> r : res) {
|
||||
System.out.println(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ class Scanner {
|
|||
/** process 'name' tokens which could be key words or text */
|
||||
private Token name() throws ScanException {
|
||||
text = new StringBuilder();
|
||||
while (!in(c, "[ \t\r\n=]")) {
|
||||
while (!in(c, "[ \t\r\n=<>]")) {
|
||||
text.append(c);
|
||||
nextChar();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue