diff options
Diffstat (limited to 'ares/ares_send.c')
-rw-r--r-- | ares/ares_send.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ares/ares_send.c b/ares/ares_send.c index fd1450b4a..c8015803b 100644 --- a/ares/ares_send.c +++ b/ares/ares_send.c @@ -44,7 +44,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, /* Verify that the query is at least long enough to hold the header. */ if (qlen < HFIXEDSZ || qlen >= (1 << 16)) { - callback(arg, ARES_EBADQUERY, NULL, 0); + callback(arg, ARES_EBADQUERY, 0, NULL, 0); return; } @@ -52,14 +52,14 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, query = malloc(sizeof(struct query)); if (!query) { - callback(arg, ARES_ENOMEM, NULL, 0); + callback(arg, ARES_ENOMEM, 0, NULL, 0); return; } query->tcpbuf = malloc(qlen + 2); if (!query->tcpbuf) { free(query); - callback(arg, ARES_ENOMEM, NULL, 0); + callback(arg, ARES_ENOMEM, 0, NULL, 0); return; } query->server_info = malloc(channel->nservers * @@ -68,7 +68,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, { free(query->tcpbuf); free(query); - callback(arg, ARES_ENOMEM, NULL, 0); + callback(arg, ARES_ENOMEM, 0, NULL, 0); return; } @@ -100,6 +100,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, } query->using_tcp = (channel->flags & ARES_FLAG_USEVC) || qlen > PACKETSZ; query->error_status = ARES_ECONNREFUSED; + query->timeouts = 0; /* Chain the query into this channel's query list. */ query->next = channel->queries; |