* prng.c (do_yarrow_init): Move mutex initialization here.
authorKen Raeburn <raeburn@mit.edu>
Wed, 17 Nov 2004 08:03:51 +0000 (08:03 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 17 Nov 2004 08:03:51 +0000 (08:03 +0000)
(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
src/lib/crypto/prng.c

index 191142bbd9a75cf087e178e204dd6742447916b6..ddcca3230122c953f8b99c599ca5fd53ba07538f 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-17  Ken Raeburn  <raeburn@mit.edu>
+
+       * prng.c (do_yarrow_init): Move mutex initialization here.
+       (krb5int_prng_init): Don't do it here.
+
 2004-11-15  Sam Hartman  <hartmans@mit.edu>
 
        * t_prng.expected t_prng.reseedtest-expected :  Update expected
index 338eaf0dd47f9243cecfd2e8e2614f29f04e47ba..7656a23aa8e6489ea1bd3824b423d5d2b7c05901 100644 (file)
@@ -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;