[haiku-bugs] Re: [Haiku] #12319: Time/NTP sometimes crashes in gethostbyname()

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Mon, 31 Aug 2015 14:39:34 -0000

#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: 0 | Platform: All
----------------------------------+----------------------------

Comment (by ttcoder):

Modified the code to do away with the obsolete `gethostbyname()` and the
code is now 100% solid in my testing, even if using ridiculously short
delays.

Might not be all that interesting for the Haiku project, but I posted the
above anyway because ticket surfers might find the code of interest to
migrate their old apps to be re-entrant I suppose. Beware though -- It's
certainly been a bit of a learning experience for me doing this twenty-
liner, been 10+ years since I last had to look up man pages for sockets
and sockadd and sockaddr_in and what not, probably missed something! The
code works for me though.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12319#comment:4>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: