#12319: Time/NTP sometimes crashes in gethostbyname()
----------------------------------+----------------------------
Reporter: ttcoder | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: Network & Internet | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
----------------------------------+----------------------------
Comment (by axeld):
The patch is indeed much smaller. However, you also removed one change of
your original patch that I liked: iterating over all results, and connect
to the first that fits.
Your new code no longer does that; it will only test the first result it
gets from the resolver.
There are a couple of style violations left that I will point out here for
your convenience:
* ''NetworkAddress.h'' and ''NetworkAddressResolver.h'' are public
headers, as such, they should be ordered differently: we have the header
counterpart of the sources first (to ensure it's complete and does not
rely on any other headers), then from most general to most specific: first
c/c++ headers, then POSIX, then Haiku, then application headers. Between
each section is a blank line.
* Line 123: No space after '(', operator (`||`) goes to the beginning of
the next line, not the end of the line.
* Line 153: Indentation seems to be wrong; the '0' from the arguments list
within the if clause needs to be indented one tab more than the block.
Thanks for the quick update!
--
Ticket URL: <https://dev.haiku-os.org/ticket/12319#comment:10>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.