Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- `address` was giving too many address.
[#20](https://github.com/netsec-ethz/jpan-cli/pull/20)
- Fixed missing `--timeout` for `showpaths`. Fixed timeout message.
[#21](https://github.com/netsec-ethz/jpan-cli/pull/21)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/scion/cli/Ping.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private void send(Path path) throws IOException {
}
if (nTimeouts > 0) {
String msg = "";
if (localPort == null || localPort != 30041) {
if (nTimeouts == count && (localPort == null || localPort != 30041)) {
msg = ". Try using \"--port 30041\"";
}
throw new ExitCodeException(1, "Number of timeouts: " + nTimeouts + msg);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/scion/cli/Showpaths.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class Showpaths {
private Long isdAs;
private boolean extended = false;
private int maxPaths = 10;
private final int timeoutMs = 5000;
private int timeoutMs = 5000;
private boolean probePath = true;

public static void main(String... args) {
Expand Down Expand Up @@ -109,6 +109,9 @@ private void parseArgs(String[] argsArray) {
case "--sciond":
daemon = parseAddress("sciond", args);
break;
case "--timeout":
timeoutMs = parseInt("timeout", args);
break;
default:
throw new ExitCodeException(2, Errors.UNKNOWN_OPTION + args.get(0));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/scion/cli/Traceroute.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void send(Path path) throws IOException {
}
if (nTimeouts > 0) {
String msg = "";
if (localPort == null || localPort != 30041) {
if (nTimeouts == results.size() && (localPort == null || localPort != 30041)) {
msg = ". Try using \"--port 30041\"";
}
throw new ExitCodeException(1, "Number of timeouts: " + nTimeouts + msg);
Expand Down
Loading