update to new krb5_eai_to_heim_errno

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9951 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-05-14 22:49:56 +00:00
parent e5ad73103f
commit 1f31dd74e9
4 changed files with 10 additions and 4 deletions

View File

@@ -46,6 +46,7 @@ get_kdc_address (krb5_context context,
int port = 0;
int error;
char *host;
int save_errno;
ret = krb5_get_krb_changepw_hst (context,
&realm,
@@ -64,9 +65,10 @@ get_kdc_address (krb5_context context,
error = roken_getaddrinfo_hostspec2(host, SOCK_DGRAM, port, ai);
if(error) {
save_errno = errno;
krb5_set_error_string(context, "resolving %s: %s",
host, gai_strerror(error));
return krb5_eai_to_heim_errno(error);
return krb5_eai_to_heim_errno(error, save_errno);
}
*ret_host = host;
return 0;