configure_network() if carrier already present
Submitted by: serg@opus.opu.odessa.ua
This commit is contained in:
parent
781d9d4623
commit
7fe4e56742
@ -202,11 +202,13 @@ int main(int argc, char **argv)
|
||||
if (redial_on_startup)
|
||||
sighup_handler();
|
||||
else if (!(modem_control & CLOCAL)) {
|
||||
ioctl(fd, TIOCMGET, &comstate);
|
||||
if (ioctl(fd, TIOCMGET, &comstate) < 0)
|
||||
syslog(LOG_NOTICE,"cannot get carrier state: %m");
|
||||
if (!(comstate & TIOCM_CD)) { /* check for carrier */
|
||||
/* force a redial if no carrier */
|
||||
kill (getpid(), SIGHUP);
|
||||
}
|
||||
} else
|
||||
configure_network();
|
||||
}
|
||||
else
|
||||
configure_network(); /* configure the network if needed. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user