From: Nickolai Zeldovich Date: Thu, 15 May 2003 16:49:12 +0000 (+0000) Subject: STABLE12-add-afsdb-aliases-for-cellservdb-cells-20030429 X-Git-Tag: openafs-stable-1_2_10~73 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=88e7a3549235ebf9b8783d469c91cf3e9ae5fb06;p=packages%2Fo%2Fopenafs.git STABLE12-add-afsdb-aliases-for-cellservdb-cells-20030429 Add cell aliases we find using AFSDB for cells that have been statically configured via CellServDB. This preserves the AFSDB implementation behavior from before the cell code rewrite. (cherry picked from commit e9993b1fce5a9d0260d94e95811a5b5dd79ef4ad) --- diff --git a/src/afs/afs_cell.c b/src/afs/afs_cell.c index 8f2ee0ecd..f7e960f45 100644 --- a/src/afs/afs_cell.c +++ b/src/afs/afs_cell.c @@ -160,7 +160,7 @@ void afs_LookupAFSDB(char *acellName) code = afs_GetCellHostsAFSDB(acellName, cellHosts, &timeout, &realName); if (code) goto done; code = afs_NewCell(realName, cellHosts, CNoSUID, NULL, 0, 0, timeout); - if (code) goto done; + if (code && code != EEXIST) goto done; /* If we found an alias, create it */ if (afs_strcasecmp(acellName, realName)) @@ -657,7 +657,7 @@ afs_int32 afs_NewCell(char *acellName, afs_int32 *acellHosts, int aflags, * it must get servers from AFSDB. */ if (timeout && !tc->timeout && tc->cellHosts[0]) { - code = EINVAL; + code = EEXIST; /* This code is checked for in afs_LookupAFSDB */ goto bad; }