You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/08/19 22:31:16 UTC

[GitHub] [trafficserver] fabikd commented on pull request #9018: dns error logging to diags

fabikd commented on PR #9018:
URL: https://github.com/apache/trafficserver/pull/9018#issuecomment-1221137953

   Right, I think it's a great idea to have @SolidWallOfCode look at it. I used the code from the master branch, https://github.com/apache/trafficserver/blob/master/iocore/dns/DNS.cc#L1556
   should I have used a different version? I’ve looked at the existing code in the master branch and these 3 labels did show `goto Lerror`: default, NOTIMP, NOTZONE, and my intent was to leave `goto Lerror` as is. I do not see `goto Lerror` on this version of the code https://github.com/apache/trafficserver/blob/master/iocore/dns/DNS.cc#L1556 for FORMERR, NXDOMAIN, YXDOMAIN, YXRRSET, NXRRSET, NOTAUTH and it was not my intention to remove `goto Lerror` on any label.
   
   As for the breaks, usually a switch statement has breaks after each case to avoid passing through the code under the next label. If I am using the correct version of the code, was the intention of it to not break and pass through all the named labels and use the last `goto Lerror` as a catch all? 
   https://github.com/apache/trafficserver/blob/master/iocore/dns/DNS.cc#L1581 
   If so, I can add `goto Lerror` to FORMERR, NXDOMAIN, YXDOMAIN, YXRRSET, NXRRSET, NOTAUTH. Just let me know! Thank you!! (:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org