-
-
Notifications
You must be signed in to change notification settings - Fork 217
Fix connectivity checking #975
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
Conversation
|
Doesn't fix the issue, see #974 (comment). |
9b4bd2e to
a33d620
Compare
|
You're right @auouymous, it didn't work on busybox. I pushed a new version which checks for interfaces with an inet and broadcast address, which apparently is a sign of active connection. This works at least with 'busybox ip' and 'ip' in Debian. |
|
Merged, thanks! |
|
Little late, but the patch works fine and looks like it should solve the issue. One problem I see, that existed before this patch, is that all three |
|
I also don't see the point for using generator functions in this case, but a patch fixing all these functions would have been a lot more invasive (and would have to be tested on all platforms). |
|
yes, no need for a generator, and no point, really, since all the command output is gathered before analyzing it. |
|
I wrote a patch the other day that renamed those three functions and returned a bool. But are those functions usable by extensions? If so, do we care about breaking extensions not in gpodder? They are only called once per manual or automatic update, so performance isn't that important. There are also some functions in util.py not used anywhere in gpodder. |
yes on both counts. Are those used, though? Not likely. An extension would use the
which ones? |
|
They are rarely called so I'm fine leaving them alone.
|
Here's a proposed fix for #974.
I'm not 100% sure on second commit which uses 'ip addr show scope global up' instead of 'ip link' to get a list of candidate interfaces, but reading the man page I think a global interface is what we're after.
BSDs and MacOS do not have 'ip' installed by default, so they should fall back to 'ifconfig'.