mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-27 13:52:14 +00:00
WIP: Fixes for link validation and announce retries
Fix for link validation failure when poackets contain new MTU in payload from RNS 1.0 (courtesy of @jlpoolen). Optimization of announce re-broadcasts from RNS 1.0.
This commit is contained in:
1 parent
3cc7c2a55d
commit
3c4978f294
8 files changed
+68
-10
No files matched your search
@@ -26,6 +26,7 @@
|
||||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
// Let's define an app name. We'll use this for all
|
||||
// destinations we create. Since this echo example
|
||||
@@ -328,11 +330,27 @@ void cleanup_handler(int signum) {
|
||||
// starts up the desired program mode.
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
bool log_trace = false;
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (argv[i] && strcasecmp(argv[i], "--log_trace") == 0) {
|
||||
log_trace = true;
|
||||
for (int j = i; j < argc - 1; ++j) {
|
||||
argv[j] = argv[j + 1];
|
||||
}
|
||||
--argc;
|
||||
--i;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(RNS_MEM_LOG)
|
||||
RNS::loglevel(RNS::LOG_MEM);
|
||||
#else
|
||||
RNS::loglevel(RNS::LOG_NOTICE);
|
||||
//RNS::loglevel(RNS::LOG_TRACE);
|
||||
if (log_trace) {
|
||||
RNS::loglevel(RNS::LOG_TRACE);
|
||||
}
|
||||
else {
|
||||
RNS::loglevel(RNS::LOG_NOTICE);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Register the signal handler for SIGINT
|
||||
|
||||
Reference in new issue
Block a user