From 91fee8a699e31ad825e84a4f2bd56eb9093ea85a Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 19 Jul 2007 16:09:50 +0000 Subject: [PATCH] viced-no-nulluuid-20070719 a host with a zero uuid has no uuid support --- src/viced/host.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/viced/host.c b/src/viced/host.c index c4b0c10e3..87f7c1318 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -82,6 +82,7 @@ extern struct afsconf_dir *confDir; /* config dir object */ extern int lwps; /* the max number of server threads */ extern afsUUID FS_HostUUID; +afsUUID nulluuid; int CEs = 0; /* active clients */ int CEBlocks = 0; /* number of blocks of CEs */ struct client *CEFree = 0; /* first free client */ @@ -1357,7 +1358,8 @@ h_GetHost_r(struct rx_connection *tcon) rx_PutConnection(cb_conn); cb_conn=NULL; H_LOCK; - if (code == RXGEN_OPCODE) { + if ((code == RXGEN_OPCODE) || + (afs_uuid_equal(&interf.uuid, &nulluuid))) { identP = (struct Identity *)malloc(sizeof(struct Identity)); if (!identP) { ViceLog(0, ("Failed malloc in h_GetHost_r\n")); @@ -1480,7 +1482,8 @@ h_GetHost_r(struct rx_connection *tcon) rx_PutConnection(cb_conn); cb_conn=NULL; H_LOCK; - if (code == RXGEN_OPCODE) { + if ((code == RXGEN_OPCODE) || + afs_uuid_equal(&interf.uuid, &nulluuid)) { if (!identP) identP = (struct Identity *)malloc(sizeof(struct Identity)); @@ -1691,6 +1694,7 @@ int num_lrealms = -1; void h_InitHostPackage() { + memset(&nulluuid, 0, sizeof(afsUUID)); afsconf_GetLocalCell(confDir, localcellname, PR_MAXNAMELEN); if (num_lrealms == -1) { int i; -- 2.39.5