[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openswan-cvs
Subject:    [Openswan CVS] openswan-2/programs/pluto dpd.c,1.7,1.8
From:       Michael Richardson <mcr () xelerance ! com>
Date:       2004-11-30 16:34:35
Message-ID: 20041130163435.CD624138039 () tla ! xelerance ! com
[Download RAW message or body]

Update of /xelerance/master/openswan-2/programs/pluto
In directory tla.xelerance.com:/tmp/cvs-serv901

Modified Files:
	dpd.c 
Log Message:
	make sure that dpd timeout is >0.





Index: dpd.c
===================================================================
RCS file: /xelerance/master/openswan-2/programs/pluto/dpd.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dpd.c	30 Nov 2004 16:07:58 -0000	1.7
+++ dpd.c	30 Nov 2004 16:34:33 -0000	1.8
@@ -126,6 +126,7 @@
        (tm < st->st_last_dpd + delay))
     {
 	time_t nextdelay = st->st_last_dpd + delay - tm;
+	time_t nexttimeout = st->st_last_dpd + timeout - tm;
 
 	/* log reason */
 	if(eroute_idle == FALSE) {
@@ -140,6 +141,9 @@
 	if(nextdelay < 1) {
 	    nextdelay = delay;
 	}
+	if(nexttimeout < 1) {
+	    nexttimeout = timeout;
+	}
 	event_schedule(EVENT_DPD, nextdelay, st);
 
 	/* If there is still a timeout for the last R_U_THERE sent,
@@ -148,8 +152,7 @@
 	    && st->st_dpd_event->ev_time > st->st_last_dpd + timeout)
 	    {
 		delete_dpd_event(st);
-		event_schedule(EVENT_DPD_TIMEOUT
-			       , st->st_last_dpd + timeout - tm, st);
+		event_schedule(EVENT_DPD_TIMEOUT, timeout, st);
 	    }
 	return;
     }

_______________________________________________
Cvs mailing list
Cvs@openswan.org
http://lists.openswan.org/mailman/listinfo/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic