/* called with the GLOCK held */ void afspag_Shutdown(void) { if (afs_shuttingdown != AFS_RUNNING) return; afs_shuttingdown = AFS_SHUTDOWN; afs_termState = AFSOP_STOP_RXCALLBACK; rx_WakeupServerProcs(); while (afs_termState == AFSOP_STOP_RXCALLBACK) afs_osi_Sleep(&afs_termState); /* rx_ServerProc sets AFS_STOP_AFS */ while (afs_termState == AFSOP_STOP_AFS) { afs_osi_CancelWait(&AFS_WaitHandler); afs_osi_Sleep(&afs_termState); } /* afs_Daemon sets AFS_STOP_RXEVENT */ #if defined(RXK_LISTENER_ENV) while (afs_termState == AFSOP_STOP_RXEVENT) afs_osi_Sleep(&afs_termState); /* afs_rxevent_daemon sets AFSOP_STOP_RXK_LISTENER */ afs_osi_UnmaskRxkSignals(); osi_StopListener(); while (afs_termState == AFSOP_STOP_RXK_LISTENER) afs_osi_Sleep(&afs_termState); /* rxk_Listener sets AFSOP_STOP_COMPLETE */ #endif }
void afs_SetCheckServerNATmode(int isnat) { static afs_int32 old_intvl, old_all_intvl; static int wasnat; if (isnat && !wasnat) { old_intvl = afs_probe_interval; old_all_intvl = afs_probe_all_interval; afs_probe_interval = afs_nat_probe_interval; afs_probe_all_interval = afs_nat_probe_interval; afs_osi_CancelWait(&AFS_CSWaitHandler); } else if (!isnat && wasnat) { afs_probe_interval = old_intvl; afs_probe_all_interval = old_all_intvl; } wasnat = isnat; }