summaryrefslogtreecommitdiff
path: root/ares_data.c
diff options
context:
space:
mode:
authorJérémy Lal <kapouer@melix.org>2010-04-18 00:29:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-04-18 00:29:26 +0200
commit63918fca7667a03b310c5f8486636a896be7ac72 (patch)
treed403f6919268eaa232ed5b513125d848a8af96df /ares_data.c
parentf28874d3233adad18f4c25df8d9437d0c9e7c3eb (diff)
downloadc-ares-63918fca7667a03b310c5f8486636a896be7ac72.tar.gz
c-ares-63918fca7667a03b310c5f8486636a896be7ac72.tar.bz2
c-ares-63918fca7667a03b310c5f8486636a896be7ac72.zip
added ares_parse_mx_reply
Diffstat (limited to 'ares_data.c')
-rw-r--r--ares_data.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ares_data.c b/ares_data.c
index 59fe449..6b6fae8 100644
--- a/ares_data.c
+++ b/ares_data.c
@@ -62,6 +62,14 @@ void ares_free_data(void *dataptr)
switch (ptr->type)
{
+ case ARES_DATATYPE_MX_REPLY:
+
+ if (ptr->data.mx_reply.next)
+ ares_free_data(ptr->data.mx_reply.next);
+ if (ptr->data.mx_reply.host)
+ free(ptr->data.mx_reply.host);
+ break;
+
case ARES_DATATYPE_SRV_REPLY:
if (ptr->data.srv_reply.next)
@@ -113,6 +121,12 @@ void *ares_malloc_data(ares_datatype type)
switch (type)
{
+ case ARES_DATATYPE_MX_REPLY:
+ ptr->data.mx_reply.next = NULL;
+ ptr->data.mx_reply.host = NULL;
+ ptr->data.mx_reply.priority = 0;
+ break;
+
case ARES_DATATYPE_SRV_REPLY:
ptr->data.srv_reply.next = NULL;
ptr->data.srv_reply.host = NULL;