add-shutdown-server-20040507

FIXES 4067

cleanup server list during shutdown
This commit is contained in:
Chas Williams 2004-05-08 05:23:56 +00:00 committed by Derrick Brashear
parent bfe8ffc727
commit fc25d8cf69
2 changed files with 29 additions and 0 deletions

View File

@ -828,5 +828,6 @@ shutdown_AFS(void)
LOCK_INIT(&afs_puttofileLock, "afs_puttofileLock");
shutdown_cell();
shutdown_server();
}
}

View File

@ -1706,3 +1706,31 @@ void afs_ActivateServer(struct srvAddr *sap) {
}
}
}
void shutdown_server()
{
int i;
for (i = 0; i < NSERVERS; i++) {
struct server *ts, *next;
ts = afs_servers[i];
while(ts) {
next = ts->next;
afs_osi_Free(ts, sizeof(struct server));
ts = next;
}
}
for (i = 0; i < NSERVERS; i++) {
struct srvAddr *sa, *next;
sa = afs_srvAddrs[i];
while(sa) {
next = sa->next_bkt;
afs_osi_Free(sa, sizeof(struct srvAddr));
sa = next;
}
}
}