Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all data_validity structs are being expired #96

Closed
wiedehopf opened this issue Jan 14, 2021 · 3 comments
Closed

Not all data_validity structs are being expired #96

wiedehopf opened this issue Jan 14, 2021 · 3 comments

Comments

@wiedehopf
Copy link

dump1090/track.c

Line 1366 in b3fcf82

#define EXPIRE(_f) do { if (a->_f##_valid.source != SOURCE_INVALID && now >= a->_f##_valid.expires) { a->_f##_valid.source = SOURCE_INVALID; } } while (0)

Might be on purpose?
In that case i can't see the purpose.

@mutability
Copy link

Which are missing?

@wiedehopf
Copy link
Author

nac_v_valid
emergency_valid

Pretty sure there are more ... i didn't check specifically check your code, in my code just put them in ordered blocks so i could easily cross-check.

I suppose with your trackdataValid function it doesn't really matter and you could theoretically just get rid of the EXPIRE stuff.
(well trackDataAge would behave a bit different if you don't expire stuff)

283 static inline int trackDataValid(const data_validity *v)                                                                            
284 {
285     return (v->source != SOURCE_INVALID && messageNow() < v->expires);
286 }

In contrast it does matter in my fork as i changed up the trackDataValid function.
Just thought i'd let you know.

mutability added a commit that referenced this issue Jan 15, 2021
@mutability
Copy link

Looks like it was just those two. I noticed that emergency_valid was not getting set up during aircraft track creation either. I think they'll all harmless since as you say the expiry time is already looked at, but no harm fixing it. Thanks for the heads-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants