chiark
/
gitweb
/
~mdw
/
qmail
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream qmail 1.03
[qmail]
/
dns.c
diff --git
a/dns.c
b/dns.c
index bbb9770cb8d9499aa1a4f19b2478c6af39bee7f1..ed427871413979ee7928987edfe80ab3ac5741e8 100644
(file)
--- a/
dns.c
+++ b/
dns.c
@@
-271,17
+271,16
@@
int pref;
int r;
struct ip_mx ix;
int r;
struct ip_mx ix;
- if (sa->len && (sa->s[0] == '['))
- {
- if (!stralloc_copy(&glue,sa)) return DNS_MEM;
- if (!stralloc_0(&glue)) return DNS_MEM;
+ if (!stralloc_copy(&glue,sa)) return DNS_MEM;
+ if (!stralloc_0(&glue)) return DNS_MEM;
+ if (glue.s[0]) {
ix.pref = 0;
ix.pref = 0;
- if (!glue.s[ip_scanbracket(glue.s,&ix.ip)])
+ if (!glue.s[ip_scan
(glue.s,&ix.ip)] || !glue.s[ip_scan
bracket(glue.s,&ix.ip)])
{
if (!ipalloc_append(ia,&ix)) return DNS_MEM;
return 0;
}
{
if (!ipalloc_append(ia,&ix)) return DNS_MEM;
return 0;
}
-
}
+ }
switch(resolve(sa,T_A))
{
switch(resolve(sa,T_A))
{
@@
-316,6
+315,7
@@
unsigned long random;
{
int r;
struct mx { stralloc sa; unsigned short p; } *mx;
{
int r;
struct mx { stralloc sa; unsigned short p; } *mx;
+ struct ip_mx ix;
int nummx;
int i;
int j;
int nummx;
int i;
int j;
@@
-324,18
+324,16
@@
unsigned long random;
if (!ipalloc_readyplus(ia,0)) return DNS_MEM;
ia->len = 0;
if (!ipalloc_readyplus(ia,0)) return DNS_MEM;
ia->len = 0;
- if (sa->len && (sa->s[0] == '['))
- {
- struct ip_mx ix;
- if (!stralloc_copy(&glue,sa)) return DNS_MEM;
- if (!stralloc_0(&glue)) return DNS_MEM;
+ if (!stralloc_copy(&glue,sa)) return DNS_MEM;
+ if (!stralloc_0(&glue)) return DNS_MEM;
+ if (glue.s[0]) {
ix.pref = 0;
ix.pref = 0;
- if (!glue.s[ip_scanbracket(glue.s,&ix.ip)])
+ if (!glue.s[ip_scan
(glue.s,&ix.ip)] || !glue.s[ip_scan
bracket(glue.s,&ix.ip)])
{
if (!ipalloc_append(ia,&ix)) return DNS_MEM;
return 0;
}
{
if (!ipalloc_append(ia,&ix)) return DNS_MEM;
return 0;
}
-
}
+ }
switch(resolve(sa,T_MX))
{
switch(resolve(sa,T_MX))
{