If ioctl TIOCMGET fails, continue. The device may be
a pseudo device created by an interactive version of rlogin/telnet/ssh & friends
This commit is contained in:
parent
bb31204c9b
commit
1599fce5c6
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: modem.c,v 1.108 1999/04/03 11:54:00 brian Exp $
|
||||
* $Id: modem.c,v 1.109 1999/04/03 12:01:38 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -287,9 +287,10 @@ modem_Timeout(void *data)
|
||||
|
||||
if (modem->fd >= 0) {
|
||||
if (ioctl(modem->fd, TIOCMGET, &modem->mbits) < 0) {
|
||||
log_Printf(LogPHASE, "%s: ioctl error (%s)!\n", modem->link.name,
|
||||
strerror(errno));
|
||||
datalink_Down(modem->dl, CLOSE_NORMAL);
|
||||
log_Printf(LogPHASE, "%s: Carrier not required (pseudo tty ?)\n",
|
||||
modem->link.name);
|
||||
timer_Stop(&modem->Timer);
|
||||
modem->mbits = TIOCM_CD;
|
||||
return;
|
||||
}
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user