feat(mdns): post event when hostname changes - #1127
Conversation
bc8d91b to
1461446
Compare
1461446 to
6643e90
Compare
david-cermak
left a comment
There was a problem hiding this comment.
LGTM overall, the only thing is posting to the system/defautl event_post
Let's rework it for now to callbacks, something like this:
typedef void (*mdns_hostname_changed_cb_t)(const char *hostname, void *arg);
esp_err_t mdns_register_hostname_changed_callback(mdns_hostname_changed_cb_t cb, void *arg);since this method is widely used alrady in the mdns component.
I'll think about the event loop usage and will probably create a private event loop that could be used instead of callbacks. BUt will do that in the next release
|
@zwx1995esp Also please rebase and resolve conflicts |
Hi @david-cermak Thanks for your reviewing. I’ll refactor the related logic and rewrite the test cases. Once everything is ready, I’ll push the updated changes and let you know. |
6643e90 to
6045268
Compare
|
@david-cermak Refactor done, PTAL. |
6045268 to
4c8b76d
Compare
Summary
mdns_hostname_changed_cb_tcallback type andmdns_register_hostname_changed_callback()API.(cb, arg)registrations.Tests
Validation
test_receiver: 4 tests passed, includingtest_hostname_changed_callback.