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

Fix network module rework #1116

Merged
merged 2 commits into from
May 27, 2021
Merged

Conversation

tperard
Copy link
Contributor

@tperard tperard commented May 27, 2021

  • one fix for wifi network appearing as disconnected after some time.
  • one improvement, to fetch wifi essid as soon as available instead of after some time.

Some RTM_NEWLINK messages may not have the IFLA_CARRIER information.
This is the case when a WiFi interface report scan result are
available. `carrier` is used regardless of if it is present in the
message or not. This would result in the interface appearing
"disconnected" in waybar when it isn't.

This patch now check that `carrier` is available before using it.

The same thing could potentially happen to `ifname` so check if it's
set before recording it.

Fixes: c1427ff (network: Handle carrier information)
Fixes Alexays#388
The module doesn't update the `essid_` as soon as a WiFi interface is
connected, but that happens at some point later, depending on
"interval" configuration.

Fix that by rerunning the get WiFi information thread when the
`carrier` state changes. Also, we will clear the state related to WiFi
when the connection is drop to avoid stale information.
@Alexays Alexays merged commit 5444a66 into Alexays:master May 27, 2021
@Alexays
Copy link
Owner

Alexays commented May 27, 2021

Thanks again @tperard, you rock!

@tperard tperard deleted the fix-network-rework branch June 8, 2021 17:58
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

Successfully merging this pull request may close these issues.

None yet

2 participants