toops - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit e269d00c9ea2764885ba69aa08fe7b04f27179ec
(DIR) parent 58ecf38778c87173edd5df82ef8b2f61927b0908
(HTM) Author: rsc <devnull@localhost>
Date: Sat, 25 Feb 2006 21:14:32 +0000
oops
Diffstat:
M src/cmd/upas/smtp/mxdial.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/src/cmd/upas/smtp/mxdial.c b/src/cmd/upas/smtp/mxdial.c
t@@ -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,
t@@ -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);