aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_user.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2015-03-20 06:43:19 +0300
committerRuslan Ermilov <ru@nginx.com>2015-03-20 06:43:19 +0300
commitd1ec868e328f58fc2c96827f4d1223ee7ed2192c (patch)
treef0a60acf5de2d5c048f9aae21abd816c3ef6e663 /src/os/unix/ngx_user.c
parentc84c19f5bf9b5e93056789940e38634fdb27a5e8 (diff)
downloadnginx-d1ec868e328f58fc2c96827f4d1223ee7ed2192c.tar.gz
nginx-d1ec868e328f58fc2c96827f4d1223ee7ed2192c.zip
Removed old pthread implementation.
Diffstat (limited to 'src/os/unix/ngx_user.c')
-rw-r--r--src/os/unix/ngx_user.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/os/unix/ngx_user.c b/src/os/unix/ngx_user.c
index 4ac969fd9..27c76ef80 100644
--- a/src/os/unix/ngx_user.c
+++ b/src/os/unix/ngx_user.c
@@ -64,16 +64,6 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
size_t len;
ngx_err_t err;
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
-
- /* crypt() is a time consuming function, so we only try to lock */
-
- if (ngx_mutex_trylock(ngx_crypt_mutex) != NGX_OK) {
- return NGX_AGAIN;
- }
-
-#endif
-
value = crypt((char *) key, (char *) salt);
if (value) {
@@ -81,25 +71,15 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
*encrypted = ngx_pnalloc(pool, len);
if (*encrypted == NULL) {
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
- ngx_mutex_unlock(ngx_crypt_mutex);
-#endif
return NGX_ERROR;
}
ngx_memcpy(*encrypted, value, len);
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
- ngx_mutex_unlock(ngx_crypt_mutex);
-#endif
return NGX_OK;
}
err = ngx_errno;
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
- ngx_mutex_unlock(ngx_crypt_mutex);
-#endif
-
ngx_log_error(NGX_LOG_CRIT, pool->log, err, "crypt() failed");
return NGX_ERROR;