From e269d00c9ea2764885ba69aa08fe7b04f27179ec Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 25 Feb 2006 21:14:32 +0000 Subject: oops --- src/cmd/upas/smtp/mxdial.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cmd/upas/smtp/mxdial.c b/src/cmd/upas/smtp/mxdial.c index 31c6e5ba..c4d477f1 100644 --- a/src/cmd/upas/smtp/mxdial.c +++ b/src/cmd/upas/smtp/mxdial.c @@ -94,6 +94,10 @@ callmx(DS *ds, char *dest, char *domain) if(nmx > 1) qsort(mx, nmx, sizeof(Mx), compar); + if(debug){ + for(i=0; inetdir, ds->proto, @@ -124,7 +128,7 @@ mxlookup(DS *ds, char *domain) nmx = 0; if((t = dnsquery(nil, ds->host, "mx")) != nil){ for(tmx=t; (tmx=ndbfindattr(tmx->entry, nil, "mx")) != nil && nmxline; tpref != tmx; tpref=tmx->line){ + for(tpref=tmx->line; tpref != tmx; tpref=tpref->line){ if(strcmp(tpref->attr, "pref") == 0){ strncpy(mx[nmx].host, tmx->val, sizeof(mx[n].host)-1); mx[nmx].pref = atoi(tpref->val); -- cgit v1.2.3