chiark / gitweb /
Backgrounded commands and RELOAD.
[tripe] / keyexch.c
index f010a38b00616208b1aa5e43926815acbb7a10ef..e62809ef680771b8848ee5d4e3e745b80a54dd1f 100644 (file)
--- a/keyexch.c
+++ b/keyexch.c
@@ -168,7 +168,7 @@ static void timer(struct timeval *tv, void *v)
   keyexch *kx = v;
   kx->f &= ~KXF_TIMER;
   T( trace(T_KEYEXCH, "keyexch: timer has popped"); )
-  kx_start(kx);
+  kx_start(kx, 0);
 }
 
 /* --- @settimer@ --- *
@@ -1070,6 +1070,7 @@ static int checkpub(keyexch *kx)
 /* --- @kx_start@ --- *
  *
  * Arguments:  @keyexch *kx@ = pointer to key exchange context
+ *             @int forcep@ = nonzero to ignore the quiet timer
  *
  * Returns:    ---
  *
@@ -1078,13 +1079,13 @@ static int checkpub(keyexch *kx)
  *             this); if no exchange is in progress, one is commenced.
  */
 
-void kx_start(keyexch *kx)
+void kx_start(keyexch *kx, int forcep)
 {
   time_t now = time(0);
 
   if (checkpub(kx))
     return;
-  if (!VALIDP(kx, now)) {
+  if (forcep || !VALIDP(kx, now)) {
     stop(kx);
     start(kx, now);
     a_notify("KXSTART %s", p_name(kx->p));