From 59affc13e7968be765cd85f9ce4d845ebee57011 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 1 Mar 1996 00:42:29 +0000 Subject: [PATCH] Take out calls to SOCKET_INITIALIZE and SOCKET_CLEANUP. This gets done in win_glue.c, and we only need to do this once. (XXX What about Macintosh?) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7577 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 7 +++++++ src/lib/krb5/os/sendto_kdc.c | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 088fabedc..84eb7bdc0 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,10 @@ +Thu Feb 29 16:14:46 1996 Theodore Y. Ts'o + + * sendto_kdc.c (krb5_sendto_kdc): Take out calls to + SOCKET_INITIALIZE and SOCKET_CLEANUP. This gets done in + win_glue.c, and we only need to do this once. (XXX What + about Macintosh?) + Tue Feb 27 18:48:03 1996 Theodore Y. Ts'o * hostaddr.c (krb5_os_hostaddr): Use #define NEED_SOCKETS instead diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index c64320c41..881066d08 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -97,12 +97,20 @@ krb5_sendto_kdc (context, message, realm, reply) } reply->length = krb5_max_dgram_size; +#if 0 + /* + * Not needed for Windows, since it's done by the DLL + * initialization. XXX What about for the Macintosh? + * + * See below for commented out SOCKET_CLEANUP() + */ if (SOCKET_INITIALIZE()) { /* PC needs this for some tcp/ip stacks */ krb5_xfree(addr); krb5_xfree(socklist); free(reply->data); return SOCKET_ERRNO; } +#endif /* * do exponential backoff. @@ -203,10 +211,12 @@ krb5_sendto_kdc (context, message, realm, reply) } retval = KRB5_KDC_UNREACH; out: - SOCKET_CLEANUP(); /* Done with sockets for now */ for (i = 0; i < naddr; i++) if (socklist[i] != INVALID_SOCKET) (void) closesocket (socklist[i]); +#if 0 + SOCKET_CLEANUP(); /* Done with sockets for now */ +#endif krb5_xfree(addr); krb5_xfree(socklist); if (retval) { -- 2.26.2