X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fdomain.c;h=304cf0ef846d9fc63ba9f863e05adf3c03bc20dd;hb=4eb74b26380dfde31c86c685f0589e0c653aebf0;hp=6e098708936cafce5d217badad11094722769cf2;hpb=5485a5966fcfeda759901f5256b7c7287d1da0df;p=citadel.git diff --git a/citadel/domain.c b/citadel/domain.c index 6e0987089..304cf0ef8 100644 --- a/citadel/domain.c +++ b/citadel/domain.c @@ -3,6 +3,22 @@ * * DNS lookup for SMTP sender * + * + * Copyright (c) 1987-2009 by the citadel.org team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "sysdep.h" @@ -14,14 +30,16 @@ #ifdef HAVE_RESOLV_H #include +#ifdef HAVE_ARPA_NAMESER_COMPAT_H +#include +#endif #include #endif - +#include #include "sysdep_decls.h" #include "citadel.h" #include "domain.h" #include "server.h" -#include "tools.h" #include "internet_addressing.h" @@ -35,8 +53,8 @@ int get_hosts(char *mxbuf, char *rectype) { int config_lines; int i; - char buf[SIZ]; - char host[SIZ], type[SIZ]; + char buf[256]; + char host[256], type[256]; int total_smarthosts = 0; if (inetcfg == NULL) return(0); @@ -44,9 +62,9 @@ int get_hosts(char *mxbuf, char *rectype) { config_lines = num_tokens(inetcfg, '\n'); for (i=0; i 1) { @@ -226,6 +223,6 @@ int getmx(char *mxbuf, char *dest) { strcat(mxbuf, mxrecs[n].host); strcat(mxbuf, "|"); } - phree(mxrecs); + free(mxrecs); return(num_mxrecs); }