-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Tizen] Do not notify the resolve error of dnssd #23156
Conversation
Signed-off-by: hyunuk.tak <[email protected]>
PR #23156: Size comparison from 910218a to 640a69e Increases (3 builds for bl602, telink)
Decreases (7 builds for cc13x2_26x2, esp32, nrfconnect, psoc6, qpg, telink)
Full report (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
@hyunuktak - please explain "It can cause a collision in the caller's user callback." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of issue does not help me understand the problem and the fix.
I see a notification of error being removed, but I am unclear of why this is causing problems and why removing the error notification is the correct thing to do.
Silent error never seem ok. At least a log seems apropriate, but a callback of "error happened" seems even better.
Please make sure that your PR description is clear to understand for reviewers.
It seems that the explanation was insufficient. |
The explanation is still vague. I do not understand it. The way I read it is: "An error is reported when resoltion fails, but this may cause an error to the user like double free". Why don't you fix the double free then? Fix on the other side. Reporting an error when an error occurs is ok. |
If you fix it, make the user properly handle the cleanup of the data. This seems to be a bug in the user usage of resolution not in the implementation of error handling. |
I guess explanation could be done by example: Linux avahi: https://github.com/project-chip/connectedhomeip/blob/master/src/platform/Linux/DnssdImpl.cpp#L693 does NOT callback error on failure Darwin: https://github.com/project-chip/connectedhomeip/blob/master/src/platform/Darwin/DnssdImpl.cpp#L344 does NOT callback on failure. I will update the summary |
Problem
DNSSD Platform contract does not expect callback to be called from within the Resolve call. In particular, the
::Resolve
error state is already returned as a return code of the method and does not need to be re-iterated within the callback (doing so seems to result in double-error handling)For reference, at least the linux-avahi and darwin implementations also do not call the callback if an error occurs within the resolve initiation.
Change overview
Remove a notification about resolve error of dnssd.
Testing
chip-tool and chip-lighting-app examples