functionally identical patch with consistently -correct- variable naming
--- djbdns-1.05.orig/axfr-get.c
+++ djbdns-1.05/axfr-get.c
@@ -223,11 +223,11 @@ unsigned int doit(char *buf,unsigned int
x_getname(buf,len,pos,&d1);
if (!dns_domain_todot_cat(&line,d1)) return 0;
if (!stralloc_cats(&line,".:")) return 0;
- if (!stralloc_catulong0(&line,dist,0)) return 0;
+ if (!stralloc_catulong0(&line,port,0)) return 0;
if (!stralloc_cats(&line,":")) return 0;
if (!stralloc_catulong0(&line,weight,0)) return 0;
if (!stralloc_cats(&line,":")) return 0;
- if (!stralloc_catulong0(&line,port,0)) return 0;
+ if (!stralloc_catulong0(&line,dist,0)) return 0;
}
else if (byte_equal(data,2,DNS_T_A) && (dlen == 4)) {
char ipstr[IP4_FMT];
--- djbdns-1.05.orig/tinydns-data.c
+++ djbdns-1.05/tinydns-data.c
@@ -393,11 +393,11 @@ int main()
}
if (!dns_domain_fromdot(&d2,f[2].s,f[2].len)) nomem();
- if (!stralloc_0(&f[4])) nomem();
- if (!scan_ulong(f[4].s,&u)) u = 0;
- uint16_pack_big(srv,u);
if (!stralloc_0(&f[5])) nomem();
if (!scan_ulong(f[5].s,&u)) u = 0;
+ uint16_pack_big(srv,u);
+ if (!stralloc_0(&f[4])) nomem();
+ if (!scan_ulong(f[4].s,&u)) u = 0;
uint16_pack_big(srv + 2,u);
if (!stralloc_0(&f[3])) nomem();
if (!scan_ulong(f[3].s,&u)) nomem();