diff options
author | David Shaw <[email protected]> | 2004-12-29 00:58:05 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-12-29 00:58:05 +0000 |
commit | f539f3d2b28b25e0c681623c9d1f256ac55ea205 (patch) | |
tree | 1007f097159ef310ee77a436a7381a6c081fed78 | |
parent | (find_endpoint): New. (diff) | |
download | gnupg-f539f3d2b28b25e0c681623c9d1f256ac55ea205.tar.gz gnupg-f539f3d2b28b25e0c681623c9d1f256ac55ea205.zip |
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.
-rw-r--r-- | util/ChangeLog | 6 | ||||
-rw-r--r-- | util/http.c | 1 | ||||
-rw-r--r-- | 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 <[email protected]> + + * 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 <[email protected]> * 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 <windows.h> #else #include <netinet/in.h> -#ifdef HAVE_ARPA_NAMESER_H #include <arpa/nameser.h> -#endif #include <resolv.h> -#endif +#endif /* !_WIN32 */ +#endif /* USE_DNS_SRV */ #include "types.h" #ifndef MAXDNAME |