Archive Index This month's Index

Subject: ares_fds returning zero FDs

ares_fds returning zero FDs

From: Jijo Xavier <jijo.xavier_at_FireEye.com>
Date: Fri, 17 Jun 2016 20:20:28 +0000

Greetings!
I use c-ares library to look up the hostname for a given IP address. Following is the sequence of operations in my code.

  1. Call ares_init to initialize the channel
  2. Call ares_gethostbyaddr, passing all the required arguments including the callback
  3. Define my fd_set and FD_ZERO it
     * fd_set readers; FD_ZERO(&readers);

  4. Call ares_fds to get the FDs that I can wait

Everything works fine almost all the time. But occasionally I ares_fds() function returns zero. No callback function is invoked. No other way of tracking what went wrong.

Is this expected ? What does it mean ? Should I treat it as an error ?

Thanks

This email and any attachments thereto may contain private, confidential, and/or privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.
Received on 2016-06-18