#include <stdlib.h>
#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#include "internal.h"
#define R_NOMEM return adns_s_nomemory
-#define CSP_ADDSTR(s) if (!adns__vbuf_appendstr(vb,(s))) R_NOMEM; else;
+#define CSP_ADDSTR(s) do { if (!adns__vbuf_appendstr(vb,(s))) R_NOMEM; } while (0)
/*
* order of sections:
* _strpair (mf,cs)
* _intstrpair (mf,cs)
* _hinfo (pa)
- * _mailbox (pap)
+ * _mailbox (pap +pap_mailbox822)
* _rp (pa)
* _soa (pa,mf,cs)
* _flat (mf)
if (!(pai->qu->flags & adns_qf_cname_loose)) nflags |= adns_qf_cname_forbid;
st= adns__internal_submit(pai->ads, &nqu, adns__findtype(adns_r_addr),
- &pai->qu->vb, id, nflags, pai->now, 0, &ctx);
+ &pai->qu->vb, id, nflags, pai->now, &ctx);
if (st) return st;
nqu->parent= pai->qu;
memset(&ctx.info,0,sizeof(ctx.info));
st= adns__internal_submit(pai->ads, &nqu, adns__findtype(adns_r_addr),
&pai->qu->vb, id,
- adns_qf_quoteok_query, pai->now, 0, &ctx);
+ adns_qf_quoteok_query, pai->now, &ctx);
if (st) return st;
nqu->parent= pai->qu;
* _mailbox (pap)
*/
-static adns_status pap_mailbox(const parseinfo *pai, int *cbyte_io, int max,
- char **mb_r) {
+static adns_status pap_mailbox822(const parseinfo *pai, int *cbyte_io, int max,
+ char **mb_r) {
int lablen, labstart, i, needquote, c, r, neednorm;
const unsigned char *p;
char *str;
return adns_s_ok;
}
+static adns_status pap_mailbox(const parseinfo *pai, int *cbyte_io, int max,
+ char **mb_r) {
+ if (pai->qu->typei->type & adns__qtf_mail822) {
+ return pap_mailbox822(pai, cbyte_io, max, mb_r);
+ } else {
+ return pap_domain(pai, cbyte_io, max, mb_r,
+ pai->qu->flags & adns_qf_quoteok_anshost ? pdf_quoteok : 0);
+ }
+}
+
/*
* _rp (pa)
*/