diff options
author | rsc <devnull@localhost> | 2006-02-25 21:14:32 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-02-25 21:14:32 +0000 |
commit | e269d00c9ea2764885ba69aa08fe7b04f27179ec (patch) | |
tree | aad760c3434c448a39e75355a407b182d67ffe33 /src/cmd/upas | |
parent | 58ecf38778c87173edd5df82ef8b2f61927b0908 (diff) | |
download | plan9port-e269d00c9ea2764885ba69aa08fe7b04f27179ec.tar.gz plan9port-e269d00c9ea2764885ba69aa08fe7b04f27179ec.tar.bz2 plan9port-e269d00c9ea2764885ba69aa08fe7b04f27179ec.zip |
oops
Diffstat (limited to 'src/cmd/upas')
-rw-r--r-- | src/cmd/upas/smtp/mxdial.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; i<nmx; i++) + print("%s %d\n", mx[i].host, mx[i].pref); + } /* dial each one in turn */ for(i = 0; i < nmx; i++){ snprint(addr, sizeof(addr), "%s/%s!%s!%s", ds->netdir, 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 && nmx<Nmx; ){ - for(tpref=tmx->line; 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); |