treat lastTime of 0 as never having checked (not within the interval).

git-svn-id: svn://10.0.0.236/trunk@124830 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
relyea%netscape.com 2002-07-09 04:40:35 +00:00
parent 6d34b5d1ba
commit ccff9eabc4

View File

@ -32,7 +32,7 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: devslot.c,v $ $Revision: 1.10 $ $Date: 2002-06-24 22:36:53 $ $Name: not supported by cvs2svn $";
static const char CVS_ID[] = "@(#) $RCSfile: devslot.c,v $ $Revision: 1.11 $ $Date: 2002-07-09 04:40:35 $ $Name: not supported by cvs2svn $";
#endif /* DEBUG */
#ifndef NSSCKEPV_H
@ -237,7 +237,8 @@ within_token_delay_period(NSSSlot *slot)
}
time = PR_IntervalNow();
lastTime = slot->lastTokenPing;
if ((time > lastTime) && ((time - lastTime) < s_token_delay_time)) {
if ((lastTime) &&
(time > lastTime) && ((time - lastTime) < s_token_delay_time)) {
return PR_TRUE;
}
slot->lastTokenPing = time;