From 085d8501570a997972197242b6719f23fe630788 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 4 Jun 2003 02:43:46 +0000 Subject: [PATCH] * locate_kdc.c (get_port): Revert last change git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15558 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 2 -- src/lib/krb5/os/locate_kdc.c | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 2b601c460..99fdebeaa 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -3,8 +3,6 @@ * changepw.c (krb5_locate_kpasswd): Check specifically for certain errors before using fallback heuristics. - * locate_kdc.c (get_port): Replace function with macro. - 2003-06-03 Alexandra Ellwood * init_os_ctx.c: Included header to get __KLAllowHomeDirectoryAccess(). diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 067942b8f..9c9fed4d1 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -100,12 +100,12 @@ _krb5_use_dns_realm(krb5_context context) #endif /* KRB5_DNS_LOOKUP */ +static int get_port (const char *service, int stream, int defalt) +{ #if 0 /* Only used for "kerberos" and "kerberos-sec", and we want the right port numbers even on the OSes that botch the entries in /etc/services. So don't bother with the lookup, except maybe to produce a warning. */ -static int get_port (const char *service, int stream, int defalt) -{ struct addrinfo hints = { 0 }; struct addrinfo *ai; int err; @@ -121,12 +121,10 @@ static int get_port (const char *service, int stream, int defalt) } freeaddrinfo (ai); } +#endif /* Any error - don't complain, just use default. */ return htons (defalt); } -#else -#define get_port(SERVICE, STREAM, DFL) htons(DFL) -#endif int krb5int_grow_addrlist (struct addrlist *lp, int nmore) -- 2.26.2