summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/main.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-01-29 01:27:58 +0000
committerbrian <brian@FreeBSD.org>1997-01-29 01:27:58 +0000
commitbfe2c2933595179da4499f68624984a9fee9a316 (patch)
treec2b48f73447142a2c98b388757bac61aa053b834 /usr.sbin/ppp/main.c
parentcb0391dcad998534fe857eb5f19f7045fce07949 (diff)
downloadFreeBSD-src-bfe2c2933595179da4499f68624984a9fee9a316.zip
FreeBSD-src-bfe2c2933595179da4499f68624984a9fee9a316.tar.gz
Move the call to TimerService() into main.c - just after the select()
call. The SIGALRM just sets a flag now, preventing the possibility of any nasty recursivness in the handler itself.
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r--usr.sbin/ppp/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index e70c110..ac8657f 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -818,12 +818,22 @@ DoLoop()
tp = (dial_up && RedialTimer.state != TIMER_RUNNING) ? &timeout : NULL;
i = select(tun_in+10, &rfds, &wfds, &efds, tp);
#endif
+
if ( i == 0 ) {
continue;
}
if ( i < 0 ) {
if ( errno == EINTR ) {
+ if( TimerServiceRequest > 0 ) {
+#ifdef DEBUG
+ logprintf( "Invoking TimerService\n" );
+#endif
+ /* Maybe a bit cautious.... */
+ TimerServiceRequest = -1;
+ TimerService();
+ TimerServiceRequest = 0;
+ }
continue; /* Got SIGALRM, Do check a queue for dialing */
}
perror("select");
OpenPOWER on IntegriCloud