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:
		| @@ -530,6 +530,7 @@ krb5_parse_address(krb5_context context, | ||||
|     int i, n; | ||||
|     struct addrinfo *ai, *a; | ||||
|     int error; | ||||
|     int save_errno; | ||||
|  | ||||
|     for(i = 0; i < num_addrs; i++) { | ||||
| 	if(at[i].parse_addr) { | ||||
| @@ -544,8 +545,9 @@ krb5_parse_address(krb5_context context, | ||||
|  | ||||
|     error = getaddrinfo (string, NULL, NULL, &ai); | ||||
|     if (error) { | ||||
| 	save_errno = errno; | ||||
| 	krb5_set_error_string (context, "%s: %s", string, gai_strerror(error)); | ||||
| 	return krb5_eai_to_heim_errno(error); | ||||
| 	return krb5_eai_to_heim_errno(error, save_errno); | ||||
|     } | ||||
|      | ||||
|     n = 0; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -141,15 +141,17 @@ krb5_get_forwarded_creds (krb5_context	    context, | ||||
|     krb5_kdc_flags kdc_flags; | ||||
|     krb5_crypto crypto; | ||||
|     struct addrinfo *ai; | ||||
|     int save_errno; | ||||
|  | ||||
|     addrs.len = 0; | ||||
|     addrs.val = NULL; | ||||
|  | ||||
|     ret = getaddrinfo (hostname, NULL, NULL, &ai); | ||||
|     if (ret) { | ||||
| 	save_errno = errno; | ||||
| 	krb5_set_error_string(context, "resolving %s: %s", | ||||
| 			      hostname, gai_strerror(ret)); | ||||
| 	return krb5_eai_to_heim_errno(ret); | ||||
| 	return krb5_eai_to_heim_errno(ret, save_errno); | ||||
|     } | ||||
|  | ||||
|     ret = add_addrs (context, &addrs, ai); | ||||
|   | ||||
| @@ -267,7 +267,7 @@ send_via_proxy (krb5_context context, | ||||
|     ret = getaddrinfo (proxy, portstr, &hints, &ai); | ||||
|     free (proxy2); | ||||
|     if (ret) | ||||
| 	return krb5_eai_to_heim_errno(ret); | ||||
| 	return krb5_eai_to_heim_errno(ret, errno); | ||||
|  | ||||
|     for (a = ai; a != NULL; a = a->ai_next) { | ||||
| 	s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Assar Westerlund
					Assar Westerlund