chiark
/
gitweb
/
~mdw
/
adns
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improving parsing code, and changing memory management. On its way,
[adns]
/
src
/
submit.c
diff --git
a/src/submit.c
b/src/submit.c
index a6d0e637bfe085ad3a2217cc92596b477ef6d6b9..bd214b19c34259fa4281ef046b6c4659a65f9380 100644
(file)
--- a/
src/submit.c
+++ b/
src/submit.c
@@
-16,15
+16,8
@@
static adns_query allocquery(adns_state ads, const char *owner, int ol,
adns_answer *ans;
qu= malloc(sizeof(*qu)+ol+1+ads->rqbuf.used); if (!qu) return 0;
adns_answer *ans;
qu= malloc(sizeof(*qu)+ol+1+ads->rqbuf.used); if (!qu) return 0;
-
- adns__vbuf_init(&qu->ans);
- if (!adns__vbuf_ensure(&qu->ans,sizeof(adns_answer))) { free(qu); return 0; }
- ans= (adns_answer*)qu->ans.buf;
- ans->status= adns_s_ok;
- ans->type= qu->typei->type;
- ans->nrrs= 0;
- ans->rrs.str= 0;
-
+ adns__vbuf_init(&qu->ansbuf);
+ qu->cname= 0;
qu->state= query_udp;
qu->next= qu->back= qu->parent= 0;
LIST_INIT(qu->children);
qu->state= query_udp;
qu->next= qu->back= qu->parent= 0;
LIST_INIT(qu->children);