From 63fe055ecd13c93a3a6070a15a745ace2e420817 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Fri, 5 Mar 2010 17:07:47 -0600 Subject: [PATCH] udebug: Fix byte ordering of last yes host Udebug gets the last 'yes' host in HBO, but afs_inet_ntoa wants it in NBO. So convert it to NBO. Change-Id: I5524d8086d5ac08875306fee923cb297c971cda8 Reviewed-on: http://gerrit.openafs.org/1549 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/ubik/udebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ubik/udebug.c b/src/ubik/udebug.c index 41a7962d7..272ca7092 100644 --- a/src/ubik/udebug.c +++ b/src/ubik/udebug.c @@ -186,13 +186,13 @@ CommandProc(struct cmd_syndesc *as, void *arock) udebug.syncVersion.counter = udebug.localVersion.counter; } - /* sockaddr is always in net-order */ + /* XDR converts addresses for us, so all addresses are in HBO */ if (udebug.lastYesHost == 0xffffffff) { printf("Last yes vote not cast yet \n"); } else { diff = udebug.now - udebug.lastYesTime; printf("Last yes vote for %s was %d secs ago (%ssync site); \n", - afs_inet_ntoa(udebug.lastYesHost), + afs_inet_ntoa(htonl(udebug.lastYesHost)), afs_cast_time_t(diff), ((udebug.lastYesState) ? "" : "not ")); -- 2.39.5