Fix connectivity checking#975
Fix connectivity checking#975elelay merged 2 commits intogpodder:mastergpodder/gpodder:masterfrom tpikonen:fix-connectivity-checktpikonen/gpodder:fix-connectivity-checkCopy head branch name to clipboard
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'.