From 1db59afc403fd147527ba98c69cd7ca6ca192f6a Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 17 Nov 2004 08:03:51 +0000 Subject: [PATCH] * prng.c (do_yarrow_init): Move mutex initialization here. (krb5int_prng_init): Don't do it here. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16880 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/ChangeLog | 5 +++++ src/lib/crypto/prng.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 191142bbd..ddcca3230 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,8 @@ +2004-11-17 Ken Raeburn + + * prng.c (do_yarrow_init): Move mutex initialization here. + (krb5int_prng_init): Don't do it here. + 2004-11-15 Sam Hartman * t_prng.expected t_prng.reseedtest-expected : Update expected diff --git a/src/lib/crypto/prng.c b/src/lib/crypto/prng.c index 338eaf0dd..7656a23aa 100644 --- a/src/lib/crypto/prng.c +++ b/src/lib/crypto/prng.c @@ -63,7 +63,7 @@ int krb5int_prng_init(void) do_yarrow_init(); if (init_error) return KRB5_CRYPTO_INTERNAL; - return k5_mutex_finish_init(&yarrow_lock); + return 0; } static void do_yarrow_init(void) @@ -71,6 +71,12 @@ static void do_yarrow_init(void) unsigned i; int yerr; + yerr = k5_mutex_finish_init(&yarrow_lock); + if (yerr) { + init_error = yerr; + return; + } + yerr = krb5int_yarrow_init (&y_ctx, NULL); if ((yerr != YARROW_OK) && (yerr != YARROW_NOT_SEEDED)) { init_error = yerr; -- 2.26.2