diff options
author | Bodo Möller <bodo@openssl.org> | 2002-09-25 15:38:57 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-09-25 15:38:57 +0000 |
commit | b8565a9af9c6a4113b11764d2f79e799266a33c0 (patch) | |
tree | c784d28d5213a900b0783b8bff9efbe24c1950fd /ssl/s3_clnt.c | |
parent | 94960c84215f89cc7f655ad13418fbb38e597ed2 (diff) |
really fix race conditions
Submitted by: "Patrick McCormick" <patrick@tellme.com>
PR: 262
PR: 291
Diffstat (limited to 'ssl/s3_clnt.c')
-rw-r--r-- | ssl/s3_clnt.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 6e29a6ce39..592e0b35c8 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -180,11 +180,14 @@ SSL_METHOD *SSLv3_client_method(void) { CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD); - memcpy((char *)&SSLv3_client_data,(char *)sslv3_base_method(), - sizeof(SSL_METHOD)); - SSLv3_client_data.ssl_connect=ssl3_connect; - SSLv3_client_data.get_ssl_method=ssl3_get_client_method; - init=0; + if (init) + { + memcpy((char *)&SSLv3_client_data,(char *)sslv3_base_method(), + sizeof(SSL_METHOD)); + SSLv3_client_data.ssl_connect=ssl3_connect; + SSLv3_client_data.get_ssl_method=ssl3_get_client_method; + init=0; + } CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD); } |