Some cleanup from Shawn Emery: Use INITIAL_TIMER macros instead of
authorKen Raeburn <raeburn@mit.edu>
Mon, 22 Dec 2008 03:49:30 +0000 (03:49 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 22 Dec 2008 03:49:30 +0000 (03:49 +0000)
hardcoding values; reset 'gfd' when turning off the alarm.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21563 dc483132-0cff-0310-8789-dd5450dbe970

src/slave/kpropd.c

index 2de921255c1aa709f647008621c8d1b2b99746df..a6fb4907a4c760246e7ce63011aab638264e7302 100644 (file)
@@ -458,7 +458,7 @@ void doit(fd)
                fprintf(stderr, "doit: setting resync alarm to 5s\n");
            signal(SIGALRM, resync_alarm);
            gfd = fd;
-           if (alarm(5) != 0) {
+           if (alarm(INITIAL_TIMER) != 0) {
                if (debug) {
                    fprintf(stderr,
                            _("%s: alarm already set\n"), progname);
@@ -508,6 +508,7 @@ void doit(fd)
         * Turn off alarm upon successful authentication from master.
         */
        alarm(0);
+       gfd = -1;
 
        if (!authorized_principal(kpropd_context, client, etype)) {
                char    *name;