Subject: Error callback

Error callback

From: Alexey Simak <alexeysimak_at_gmail.com>
Date: Fri, 4 Dec 2009 14:32:24 +0200

Hi Daniel,

We still have a rarely occured problem described here
http://c-ares.haxx.se/mail/c-ares-archive-2009-09/0000.html
and trying to detect the reason. To get more info we need
an ability to log errors as they happen. On the other hand
we'd like our changes to be a part of c-ares.

So what do you think about adding error callback which
is called in certain scenarios -- like when swrite() returns -1
and looks like:

// error types for ares_error_callback
#define ARES_ERRTYPE_SWRITE 0

typedef void (*ares_error_callback)(void *arg, int errtype, int errno);

Thanks,
Alexey Simak
Received on 2009-12-04