--- sbbs/src/sbbs3/mxlookup.c 2018/04/24 16:41:23 1.1 +++ sbbs/src/sbbs3/mxlookup.c 2018/04/24 16:43:45 1.1.1.2 @@ -2,7 +2,7 @@ /* Synchronet DNS MX-record lookup routines */ -/* $Id: mxlookup.c,v 1.1 2018/04/24 16:41:23 root Exp $ */ +/* $Id: mxlookup.c,v 1.1.1.2 2018/04/24 16:43:45 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * @@ -342,7 +342,7 @@ int dns_getmx(char* name, char* mx, char answers=ntohs(msghdr.ancount); p=msg+len; /* Skip the header and question portion */ - for(i=0;i 3) + bindaddr=ntohl(inet_addr(argv[3])); + + if((result=dns_getmx(argv[1],mx,mx2,bindaddr,inet_addr(argv[2]),FALSE,60))!=0) printf("Error %d getting mx record\n",result); else { printf("MX1: %s\n",mx); printf("MX2: %s\n",mx2); } +#ifdef _WIN32 WSACleanup(); +#endif gets(mx); } #endif