From: Art Cancro Date: Wed, 16 Feb 2000 01:40:51 +0000 (+0000) Subject: * Fixes X-Git-Tag: v7.86~7306 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=a0e8c30d9f915c864be900f2a539940070a5e920;p=citadel.git * Fixes --- diff --git a/citadel/domain.c b/citadel/domain.c index 4c35a3bdb..0f61f4a44 100644 --- a/citadel/domain.c +++ b/citadel/domain.c @@ -1,10 +1,13 @@ #include #include +#include #include #include #include #include "sysdep_decls.h" +#include "citadel.h" #include "domain.h" +#include "server.h" #define SMART_HOST "gatekeeper.wdcs.com" @@ -25,10 +28,10 @@ void sort_mxrecs(struct mx *mxrecs, int num_mxrecs) { for (b = 0; b <= a; ++b) { if (mxrecs[b].pref > mxrecs[b+1].pref) { - memcpy(hold1, mxrefs[b], sizeof(struct mx)); - memcpy(hold2, mxrefs[b+1], sizeof(struct mx)); - memcpy(mxrefs[b], hold2, sizeof(struct mx)); - memcpy(mxrefs[b+1], hold1, sizeof(struct mx)); + memcpy(&hold1, &mxrecs[b], sizeof(struct mx)); + memcpy(&hold2, &mxrecs[b+1], sizeof(struct mx)); + memcpy(&mxrecs[b], &hold2, sizeof(struct mx)); + memcpy(&mxrecs[b+1], &hold1, sizeof(struct mx)); } } } @@ -50,7 +53,6 @@ int getmx(char *mxbuf, char *dest) { char answer[1024]; int ret; unsigned char *startptr, *endptr, *ptr; - int expanded_size; char expanded_buf[1024]; unsigned short pref, type; int n; @@ -138,13 +140,7 @@ int getmx(char *mxbuf, char *dest) { } } - lprintf(9, "unsorted...\n"); - for (n=0; n