From: Jeffrey Altman Date: Wed, 15 Jul 2009 06:27:29 +0000 (-0400) Subject: RXAFSCB_GetCellServDB takes a serverList not an array of afs_int32 X-Git-Tag: openafs-devel-1_5_61~109 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6a68be71da262b7cc3a150097d579f64325c29ce;p=packages%2Fo%2Fopenafs.git RXAFSCB_GetCellServDB takes a serverList not an array of afs_int32 Reported by Marcus Watts ListCellsRPC calls RXAFSCB_GetCellServDB which takes a serverList and not an array of afs_int32. Add the serverList and copy the resulting server addresses into the array of afs_int32 address values. Include afs/afscbint.h instead of afs/afsint.h in order to obtain prototypes for RXAFSCB_ functions. Reviewed-on: http://gerrit.openafs.org/89 Verified-by: Russ Allbery Reviewed-by: Russ Allbery --- diff --git a/src/libadmin/adminutil/afs_utilAdmin.c b/src/libadmin/adminutil/afs_utilAdmin.c index 2c8be373b..22f4b77a8 100644 --- a/src/libadmin/adminutil/afs_utilAdmin.c +++ b/src/libadmin/adminutil/afs_utilAdmin.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #ifdef AFS_NT40_ENV @@ -1998,18 +1998,28 @@ ListCellsRPC(void *rpc_specific, int slot, int *last_item, afs_status_t tst = 0; cm_list_cell_get_p t = (cm_list_cell_get_p) rpc_specific; char *name; + serverList sl; + unsigned int n; /* * Get the next entry in the CellServDB. */ name = t->cell[slot].cellname; + sl.serverList_len = 0; + sl.serverList_val = NULL; + memset(t->cell[slot].serverAddr, 0, sizeof(afs_int32)*UTIL_MAX_CELL_HOSTS); tst = - RXAFSCB_GetCellServDB(t->conn, t->index, &name, - t->cell[slot].serverAddr); + RXAFSCB_GetCellServDB(t->conn, t->index, &name, &sl); if (tst) { goto fail_ListCellsRPC; } strcpy(t->cell[slot].cellname, name); + if (sl.serverList_val) { + for (n=0; ncell[slot].serverAddr[n] = sl.serverList_val[n]; + } + xdr_free(sl.serverList_val, sl.serverList_len); + } /* * See if we've processed all the entries