From dbcab3d2d89208081455c7ad1bf49d9ced00ae8c Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Wed, 20 Jun 2001 14:09:33 +0000 Subject: [PATCH] * t_std_conf.c (test_locate_kdc): Update to new krb5_locate_kdc interface. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13412 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/t_std_conf.c | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 137ef7680..68e670a1a 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +2001-06-20 Ezra Peisach + + * t_std_conf.c (test_locate_kdc): Update to new krb5_locate_kdc + interface. + 2001-06-19 Ken Raeburn * locate_kdc.c (struct addrlist, ADDRLIST_INIT): Moved to diff --git a/src/lib/krb5/os/t_std_conf.c b/src/lib/krb5/os/t_std_conf.c index dcd309f33..047eca950 100644 --- a/src/lib/krb5/os/t_std_conf.c +++ b/src/lib/krb5/os/t_std_conf.c @@ -107,7 +107,7 @@ static void test_locate_kdc(ctx, realm) krb5_context ctx; char *realm; { - struct sockaddr **addrs; + struct addrlist addrs; struct sockaddr_in *s_sin; int i, naddrs; int get_masters=0; @@ -116,19 +116,18 @@ static void test_locate_kdc(ctx, realm) 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"); } -- 2.26.2