/* Check all channels if we have a 'no carrier' timeout. Timeout value is set by Register S7.  */
void isdn_tty_carrier_timeout(void)
/* Check all channels if we have a 'no carrier' timeout. Timeout value is set by Register S7.  */
void isdn_tty_carrier_timeout(void)
{
	int ton = 0;
	int i;
	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
		modem_info *info = &dev->mdm.info[i];
		if (info->dialing) {
			if (info->emu.carrierwait++ > info->emu.mdmreg[REG_WAITC]) {
				info->dialing = 0;
				isdn_tty_modem_result(RESULT_NO_CARRIER, info);
				isdn_tty_modem_hup(info, 1);
			}
			else
				ton = 1;
		}
	}
	isdn_timer_ctrl(ISDN_TIMER_CARRIER, ton);
}