From f539f3d2b28b25e0c681623c9d1f256ac55ea205 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 29 Dec 2004 00:58:05 +0000 Subject: [PATCH] Better implementation for the SRV check. We don't need to actually check all the header files individually since the SRV test compile uses them together. --- util/ChangeLog | 6 ++++++ util/http.c | 1 + util/srv.h | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/util/ChangeLog b/util/ChangeLog index 49d5734ae..84ed9f21d 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,9 @@ +2004-12-28 David Shaw + + * srv.h: Better implementation for the SRV check. We don't need + to actually check all the header files individually since the SRV + test compile uses them together. + 2004-12-20 Werner Koch * strgutil.c (handle_iconv_error): Turn diagnostics into warnings diff --git a/util/http.c b/util/http.c index a0e3c337c..3be005982 100644 --- a/util/http.c +++ b/util/http.c @@ -826,6 +826,7 @@ connect_server( const char *server, ushort port, unsigned int flags, srvlist=m_alloc_clear(sizeof(struct srventry)); srvlist->port=port; strncpy(srvlist->target,server,MAXDNAME); + srvlist->target[MAXDNAME-1]='\0'; srvcount=1; } diff --git a/util/srv.h b/util/srv.h index 2270f6a5f..d672d3f47 100644 --- a/util/srv.h +++ b/util/srv.h @@ -21,15 +21,15 @@ #ifndef _SRV_H_ #define _SRV_H_ +#ifdef USE_DNS_SRV #ifdef _WIN32 #include #else #include -#ifdef HAVE_ARPA_NAMESER_H #include -#endif #include -#endif +#endif /* !_WIN32 */ +#endif /* USE_DNS_SRV */ #include "types.h" #ifndef MAXDNAME