diff options
author | Jason Reiss <jreiss@multitech.com> | 2019-11-01 08:22:39 -0500 |
---|---|---|
committer | Jason Reiss <jreiss@multitech.com> | 2019-11-01 08:22:39 -0500 |
commit | 891853489f5e55c28f3fae401542fa1ab2a9dddc (patch) | |
tree | c542abfedb18e95659548fb606e9d1967175860b | |
parent | 3160bf3a91d042d00441c77db32be6f51b7100e2 (diff) | |
download | lora-query-891853489f5e55c28f3fae401542fa1ab2a9dddc.tar.gz lora-query-891853489f5e55c28f3fae401542fa1ab2a9dddc.tar.bz2 lora-query-891853489f5e55c28f3fae401542fa1ab2a9dddc.zip |
Add short circuit if LNS is not listening on port 66771.0.5
-rw-r--r-- | main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -118,7 +118,7 @@ int main(int argc, char**argv) { if (opt_stats_reset) { runCmd(cmd_stats_reset); } - + if (opt_command) { std::stringstream cmd; @@ -229,6 +229,10 @@ void runCmd(const char *command) { receiveStream.str(""); receiveStream.clear(); + if (system("netstat -lanu | grep \":6677 \"")) { + return; + } + if (NULL == command) { printError("Command is null\n"); return; |