aboutsummaryrefslogtreecommitdiff
path: root/tools/plink/sshrand.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-19 13:13:51 +0000
committermarha <marha@users.sourceforge.net>2010-11-19 13:13:51 +0000
commitbd5413c3a7e500fa8c8ccd68a33d2fcc4c172e28 (patch)
treeb77dfbc85a3ad280e488b7840ac42221785e0831 /tools/plink/sshrand.c
parent87e3509a1a9724e6115385686d9121f6c4a0f473 (diff)
parent773752eab55047c33bad0d88006bb69f5c601502 (diff)
downloadvcxsrv-bd5413c3a7e500fa8c8ccd68a33d2fcc4c172e28.tar.gz
vcxsrv-bd5413c3a7e500fa8c8ccd68a33d2fcc4c172e28.tar.bz2
vcxsrv-bd5413c3a7e500fa8c8ccd68a33d2fcc4c172e28.zip
svn merge ^/branches/released .
Diffstat (limited to 'tools/plink/sshrand.c')
-rw-r--r--tools/plink/sshrand.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/plink/sshrand.c b/tools/plink/sshrand.c
index 57ccc1393..91d9b3772 100644
--- a/tools/plink/sshrand.c
+++ b/tools/plink/sshrand.c
@@ -4,6 +4,7 @@
#include "putty.h"
#include "ssh.h"
+#include <assert.h>
/* Collect environmental noise every 5 minutes */
#define NOISE_REGULAR_INTERVAL (5*60*TICKSPERSEC)
@@ -225,6 +226,10 @@ void random_ref(void)
void random_unref(void)
{
random_active--;
+ assert(random_active >= 0);
+ if (random_active) return;
+
+ expire_timer_context(&pool);
}
int random_byte(void)