mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
windows-all-cell-list-20070619
Reverse the order of the allCellsp list. Append new cells onto the end of the list. This ensures that the workstation cell will always be the first in the list. Adding additional cells will not degrade the performance to the workstation cell.
This commit is contained in:
parent
01c3c334d5
commit
adb83635bb
@ -225,9 +225,15 @@ cm_cell_t *cm_GetCell_Gen(char *namep, char *newnamep, afs_uint32 flags)
|
|||||||
strncpy(cp->name, fullname, CELL_MAXNAMELEN);
|
strncpy(cp->name, fullname, CELL_MAXNAMELEN);
|
||||||
cp->name[CELL_MAXNAMELEN-1] = '\0';
|
cp->name[CELL_MAXNAMELEN-1] = '\0';
|
||||||
|
|
||||||
/* thread on global list */
|
/* append cell to global list */
|
||||||
cp->nextp = cm_data.allCellsp;
|
if (cm_data.allCellsp == NULL) {
|
||||||
cm_data.allCellsp = cp;
|
cm_data.allCellsp = cp;
|
||||||
|
} else {
|
||||||
|
for (cp2 = cm_data.allCellsp; cp2->nextp; cp2=cp2->nextp)
|
||||||
|
;
|
||||||
|
cp2->nextp = cp;
|
||||||
|
}
|
||||||
|
cp->nextp = NULL;
|
||||||
|
|
||||||
/* the cellID cannot be 0 */
|
/* the cellID cannot be 0 */
|
||||||
cp->cellID = ++cm_data.currentCells;
|
cp->cellID = ++cm_data.currentCells;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user