+2001-06-20 Ezra Peisach <epeisach@mit.edu>
+
+ * t_std_conf.c (test_locate_kdc): Update to new krb5_locate_kdc
+ interface.
+
2001-06-19 Ken Raeburn <raeburn@mit.edu>
* locate_kdc.c (struct addrlist, ADDRLIST_INIT): Moved to
krb5_context ctx;
char *realm;
{
- struct sockaddr **addrs;
+ struct addrlist addrs;
struct sockaddr_in *s_sin;
int i, naddrs;
int get_masters=0;
rlm.data = realm;
rlm.length = strlen(realm);
- retval = krb5_locate_kdc(ctx, &rlm, &addrs, &naddrs,
- get_masters);
+ retval = krb5_locate_kdc(ctx, &rlm, &addrs, get_masters);
if (retval) {
com_err("krb5_locate_kdc", retval, 0);
return;
}
printf("krb_locate_kdc(%s) returned:", realm);
- for (i=0; i < naddrs; i++) {
- s_sin = (struct sockaddr_in *) addrs[i];
+ for (i=0; i < addrs.naddrs; i++) {
+ s_sin = (struct sockaddr_in *) addrs.addrs[i];
printf(" %s/%d", inet_ntoa(s_sin->sin_addr),
ntohs(s_sin->sin_port));
}
- free(addrs);
+ krb5int_free_addrlist(&addrs);
printf("\n");
}