projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Logging: add timestamps for eventdriven IO
[citadel.git]
/
citadel
/
modules
/
c-ares-dns
/
serv_c-ares-dns.c
diff --git
a/citadel/modules/c-ares-dns/serv_c-ares-dns.c
b/citadel/modules/c-ares-dns/serv_c-ares-dns.c
index 8d433268dc0e6c56cc4292e9a263ac40e6259d02..d1b1a027e5f86d2ac33acdad19115058585d4b69 100644
(file)
--- a/
citadel/modules/c-ares-dns/serv_c-ares-dns.c
+++ b/
citadel/modules/c-ares-dns/serv_c-ares-dns.c
@@
-433,6
+433,7
@@
int QueueQuery(ns_type Type,
IO->DNS.Query = QueryParts;
IO->DNS.Query->PostDNS = PostDNS;
IO->DNS.Query = QueryParts;
IO->DNS.Query->PostDNS = PostDNS;
+ IO->DNS.Start = IO->Now;
InitC_ares_dns(IO);
InitC_ares_dns(IO);
@@
-521,6
+522,7
@@
static void DNS_send_callback(struct ev_loop *loop, ev_io *watcher, int revents)
{
AsyncIO *IO = watcher->data;
{
AsyncIO *IO = watcher->data;
+ IO->Now = ev_now(event_base);
#ifdef DEBUG_CARES
EV_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);
#endif
#ifdef DEBUG_CARES
EV_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);
#endif
@@
-533,6
+535,8
@@
static void DNS_recv_callback(struct ev_loop *loop, ev_io *watcher, int revents)
{
AsyncIO *IO = watcher->data;
{
AsyncIO *IO = watcher->data;
+ IO->Now = ev_now(event_base);
+
#ifdef DEBUG_CARES
EV_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);
#endif
#ifdef DEBUG_CARES
EV_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);
#endif
@@
-564,6
+568,7
@@
void SockStateCb(void *data, int sock, int read, int write)
IO->DNS.SourcePort);
}
#endif
IO->DNS.SourcePort);
}
#endif
+ IO->Now = ev_now(event_base);
if (read) {
if ((IO->DNS.recv_event.fd != sock) &&
if (read) {
if ((IO->DNS.recv_event.fd != sock) &&