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

Better handling with state change callback #62

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

d-a-v
Copy link
Owner

@d-a-v d-a-v commented Sep 16, 2022

Call our own netif_status_changed from netif->status_callback() as it should have been from the beginning.

Using esp8266/Arduino mDNS example, where

  • AP is started first
  • mDNS is started
  • STA is started later

Without this change, status callback is called only for STA, once, when IP address is not assigned
With this change, status callback is called when AP or STA change their state, including when an IP address is later set by DHCP.

@mcspr
Copy link
Collaborator

mcspr commented Sep 17, 2022

Yep, makes sense.

So the idea with hiding original (sdk) callback is only make status work with our objects?
From Arduino side, I assume we already know that status callback may also be called on flag down?
Minor nit... any reason for commenting out code instead of relying on vcs history?

@mcspr mcspr merged commit e8654cd into master Oct 31, 2022
@mcspr mcspr deleted the BetterCallingNetifStatusChanged branch October 31, 2022 04:31
mcspr pushed a commit to esp8266/Arduino that referenced this pull request Oct 31, 2022
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
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.

2 participants