/* Switch all modem-channels who are online and got a valid escape-sequence 1.5 seconds ago, to command-mode. This function is called every second via timer-interrupt from within timer-dispatcher isdn_timer_function()  */
void isdn_tty_modem_escape(void)
/* Switch all modem-channels who are online and got a valid escape-sequence 1.5 seconds ago, to command-mode. This function is called every second via timer-interrupt from within timer-dispatcher isdn_timer_function()  */
void isdn_tty_modem_escape(void)
{
	int ton = 0;
	int i;
	int midx;
	for (i = 0; i < ISDN_MAX_CHANNELS; i++)
		if (USG_MODEM(dev->usage[i]))
			if ((midx = dev->m_idx[i]) >= 0) {
				modem_info *info = &dev->mdm.info[midx];
				if (info->online) {
					ton = 1;
					if ((info->emu.pluscount == 3) &&
					    time_after(jiffies , info->emu.lastplus + PLUSWAIT2)) {
						info->emu.pluscount = 0;
						info->online = 0;
						isdn_tty_modem_result(RESULT_OK, info);
					}
				}
			}
	isdn_timer_ctrl(ISDN_TIMER_MODEMPLUS, ton);
}