Ticket #1882 (closed RFC: fixed)

Opened 11 years ago

Last modified 11 years ago

gethostbyname failure doesn't throw an exception

Reported by: dukeleto Owned by: whiteknight
Priority: normal Milestone: 2.11
Component: docs Version: 2.10.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: unix


Currently in src/io/socket_unix.c there is the following code:

        /* Maybe it is a hostname, try to lookup */
        /* XXX Check PIO option before doing a name lookup,
         * it may have been toggled off.
        struct hostent *he = gethostbyname(host);
        /* XXX FIXME - Handle error condition better */
        if (!he) {
            fprintf(stderr, "gethostbyname failure [%s]\n", host);

What kind of exception should be thrown here?

Change History

Changed 11 years ago by nwellnhof

  • status changed from new to closed
  • resolution set to fixed

I fixed that a while ago.

Note: See TracTickets for help on using tickets.