[net.bugs.uucp] restricting uucp times

jr@taurus.UUCP (Jim R Oldroyd) (11/29/83)

Y'all probably know this already, but, then again, I might just
have discovered it:

The manual implies that an L.sys entry like
	... Any2100-0800 ...
will restrict calls to between 9pm and 8am. Well folks, it
doesn't work, so here's the fix:

FILE conn.c, about 5 lines from the end:

BEFORE:

	i = sscanf(s, "%d-%d", &tl, &th);
	tn = tp->tm_hour * 100 + tp->tm_min;
	if (i < 2)
		return(1);
	if (tn >= tl && tn <= th)
		return(1);
	return(0);
}

AFTER:

	i = sscanf(s, "%d-%d", &tl, &th);
	tn = tp->tm_hour * 100 + tp->tm_min;
	if (i < 2)
		return(1);
	if (tl < th) {
		if (tn >= tl && tn <= th)
			return(1);
	}
	else {
		if (tn >= tl && tn < 2400 || tn >= 0000 && tn <= th)
			return(1);
	}
	return(0);
}

Hope its of use to someone....

-- 
/ jr
/ jim r oldroyd
/ <england>!ukc!hirst1!minotaur!taurus!jr