From aec2a617d8c269c24bac3cb6d14e14e1309afd00 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 6 Feb 2003 23:13:07 +0000 Subject: [PATCH] * locate_kdc.c (translate_ai_error): Handle EAI_ADDRFAMILY like EAI_NONAME. (krb5int_add_host_to_list): Translate errors returned from the second getaddrinfo call. ticket: 1339 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15160 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 7 +++++++ src/lib/krb5/os/locate_kdc.c | 11 ++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 0eb356f00..3ad433b12 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,10 @@ +2003-02-06 Ken Raeburn + + * locate_kdc.c (translate_ai_error): Handle EAI_ADDRFAMILY like + EAI_NONAME. + (krb5int_add_host_to_list): Translate errors returned from the + second getaddrinfo call. + 2003-02-04 Tom Yu * prompter.c (krb5_prompter_posix): Rewrite to no longer use diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 8dbd55303..9c9fed4d1 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -170,9 +170,6 @@ static int translate_ai_error (int err) switch (err) { case 0: return 0; -#ifdef EAI_ADDRFAMILY - case EAI_ADDRFAMILY: -#endif case EAI_BADFLAGS: case EAI_FAMILY: case EAI_SOCKTYPE: @@ -185,6 +182,9 @@ static int translate_ai_error (int err) case EAI_MEMORY: /* Translate to standard errno code. */ return ENOMEM; +#ifdef EAI_ADDRFAMILY + case EAI_ADDRFAMILY: +#endif #if EAI_NODATA != EAI_NONAME case EAI_NODATA: #endif @@ -281,11 +281,8 @@ krb5int_add_host_to_list (struct addrlist *lp, const char *hostname, hint.ai_family = AF_INET; err = getaddrinfo (hostname, secportbuf, &hint, &addrs); if (err) { -#if 0 - return translate_ai_error (err); -#else + err = translate_ai_error (err); goto egress; -#endif } for (a = addrs; a != 0 && err == 0; a = anext) { anext = a->ai_next; -- 2.26.2