projects
/
rrq
/
rrqnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
135e3b5
)
Bug fix: flip-over limits are in microseconds.
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Tue, 26 Oct 2021 22:21:35 +0000
(09:21 +1100)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Tue, 26 Oct 2021 22:21:35 +0000
(09:21 +1100)
rrqnet.c
patch
|
blob
|
history
diff --git
a/rrqnet.c
b/rrqnet.c
index db93fd70ec50e19bd708215d45e275622a8c06a3..6b57d08b304af3e989df44e8d07cdbb7148c3553 100644
(file)
--- a/
rrqnet.c
+++ b/
rrqnet.c
@@
-99,10
+99,10
@@
typedef struct _ReaderData {
#define TIME_MICROS(TM) (((int64_t) (TM)->tv_sec * 1000000) + (TM)->tv_usec )
#define DIFF_MICROS(TM1,TM2) ( TIME_MICROS(TM1) - TIME_MICROS(TM2) )
#define TIME_MICROS(TM) (((int64_t) (TM)->tv_sec * 1000000) + (TM)->tv_usec )
#define DIFF_MICROS(TM1,TM2) ( TIME_MICROS(TM1) - TIME_MICROS(TM2) )
-// RECENT(T,M) is the time logic for requiring a gap time (in
+// RECENT
_MICROS
(T,M) is the time logic for requiring a gap time (in
// milliseconds) before shifting a MAC to a new remote. The limit is
// milliseconds) before shifting a MAC to a new remote. The limit is
-// 6
000 for broadcast and 20000
for unicast.
-#define RECENT
(T,M) ((M) < ((T)? 6000 : 2
0000 ))
+// 6
s for broadcast and 20s
for unicast.
+#define RECENT
_MICROS(T,M) ((M) < ((T)? 6000000 : 2000
0000 ))
// VERYOLD_MICROSS is used for discarding downlink remotes whose latest
// activity is older than this.
// VERYOLD_MICROSS is used for discarding downlink remotes whose latest
// activity is older than this.
@@
-1058,10
+1058,10
@@
static struct Interface *input_check(
// The packet source MAC has arrived on other than its
// previous channel. It thus gets dropped if tap/stdin is the
// primary channel, or the time since the last packet for that
// The packet source MAC has arrived on other than its
// previous channel. It thus gets dropped if tap/stdin is the
// primary channel, or the time since the last packet for that
- // interface is less than RECENT
, with different limits for
- // broadcast and unicast.
+ // interface is less than RECENT
_MICROS, with different limits
+ //
for
broadcast and unicast.
int64_t dmac = DIFF_MICROS( &now, &x->rec_when);
int64_t dmac = DIFF_MICROS( &now, &x->rec_when);
- if ( x->remote->spec == 0 || RECENT( *buf & 1, dmac ) ) {
+ if ( x->remote->spec == 0 || RECENT
_MICROS
( *buf & 1, dmac ) ) {
if ( verbose >= 2 ) {
fprintf(
stderr,
if ( verbose >= 2 ) {
fprintf(
stderr,