Fossil

Check-in [b6b5048a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a compiler warning on the mac build.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | smtp-win
Files: files | file ages | folders
SHA3-256: b6b5048a1b4a7cd088cac4b06ed69910311f9f10936b81c0fcbe24dd27cb9240
User & Date: drh 2018-07-12 13:13:02.924
Context
2018-07-12
13:15
Get the smtp_mx_host() routine working on Windows in addition to Linux. ... (check-in: 9a6c6c2c user: drh tags: trunk)
13:13
Fix a compiler warning on the mac build. ... (Closed-Leaf check-in: b6b5048a user: drh tags: smtp-win)
13:09
Get this branch working with mingw and on Mac ... (check-in: f55c0fdc user: drh tags: smtp-win)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/smtp.c.
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
  }
  if( pBest ){
    ns_name_uncompress(aDns, aDns+nDns, pBest+2,
                       zHostname, sizeof(zHostname));
    return fossil_strdup(zHostname);
  }
  return 0;
#endif /* defined(FOSSIL_UNIX_SYTLE_DNS) */
#if defined(FOSSIL_WINDOWS_STYLE_DNS)
  DNS_STATUS status;           /* Return status */
  PDNS_RECORDA pDnsRecord, p;  /* Pointer to DNS_RECORD structure */
  int iBestPriority = 9999999; /* Best priority */
  char *pBest = 0;             /* RDATA for the best answer */

  status = DnsQuery_UTF8(zDomain,            /* Domain name */
                         DNS_TYPE_MX,        /* DNS record type */







<
|







80
81
82
83
84
85
86

87
88
89
90
91
92
93
94
  }
  if( pBest ){
    ns_name_uncompress(aDns, aDns+nDns, pBest+2,
                       zHostname, sizeof(zHostname));
    return fossil_strdup(zHostname);
  }
  return 0;

#elif defined(FOSSIL_WINDOWS_STYLE_DNS)
  DNS_STATUS status;           /* Return status */
  PDNS_RECORDA pDnsRecord, p;  /* Pointer to DNS_RECORD structure */
  int iBestPriority = 9999999; /* Best priority */
  char *pBest = 0;             /* RDATA for the best answer */

  status = DnsQuery_UTF8(zDomain,            /* Domain name */
                         DNS_TYPE_MX,        /* DNS record type */
108
109
110
111
112
113
114


115
116
117
118
119
120
121
    p = p->pNext;
  }
  if( pBest ){
    pBest = fossil_strdup(pBest); 
  }
  DnsRecordListFree(pDnsRecord, DnsFreeRecordListDeep);
  return pBest;


#endif /* defined(FOSSIL_WINDOWS_STYLE_DNS) */
}

/*
** COMMAND: test-find-mx
**
** Usage: %fossil test-find-mx DOMAIN ...







>
>







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
    p = p->pNext;
  }
  if( pBest ){
    pBest = fossil_strdup(pBest); 
  }
  DnsRecordListFree(pDnsRecord, DnsFreeRecordListDeep);
  return pBest;
#else
  return 0;
#endif /* defined(FOSSIL_WINDOWS_STYLE_DNS) */
}

/*
** COMMAND: test-find-mx
**
** Usage: %fossil test-find-mx DOMAIN ...