/* * LCP has terminated the link; go to the Dead phase and take the * physical layer down. */ void link_terminated(int unit) { AUTHDEBUG(LOG_INFO, ("link_terminated: %d\n", unit)); if (lcp_phase[unit] == PHASE_DEAD) { return; } if (logged_in) { plogout(); } lcp_phase[unit] = PHASE_DEAD; AUTHDEBUG(LOG_NOTICE, ("Connection terminated.\n")); pppLinkTerminated(unit); }
/* * LCP has terminated the link; go to the Dead phase and take the * physical layer down. */ void link_terminated(int unit) { extern time_t etime, stime; extern int minutes; if (phase == PHASE_DEAD) return; if (logged_in) plogout(); phase = PHASE_DEAD; etime = time(NULL); minutes = (etime-stime)/60; syslog(LOG_NOTICE, "Connection terminated, connected for %d minutes\n", minutes > 1 ? minutes : 1); }