aboutsummaryrefslogtreecommitdiffstats
path: root/main/ssl.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-08 15:56:28 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-08 15:56:28 +0000
commitbd24ce971c7dce2f7f31de40f0fb22c29ac30744 (patch)
tree7a9b6364ee807e164fdc7f48a14517c42ff963d4 /main/ssl.c
parentbe5632375f0c644190d89aa5888eb1d019ac22ba (diff)
Use tabs instead of spaces for indentation.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@205151 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ssl.c')
-rw-r--r--main/ssl.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/main/ssl.c b/main/ssl.c
index 4f039c4f1..99c2cb4a8 100644
--- a/main/ssl.c
+++ b/main/ssl.c
@@ -45,23 +45,23 @@ static int ssl_num_locks;
static unsigned long ssl_threadid(void)
{
- return pthread_self();
+ return pthread_self();
}
static void ssl_lock(int mode, int n, const char *file, int line)
{
- if (n < 0 || n >= ssl_num_locks) {
- ast_log(LOG_ERROR, "OpenSSL is full of LIES!!! - "
+ if (n < 0 || n >= ssl_num_locks) {
+ ast_log(LOG_ERROR, "OpenSSL is full of LIES!!! - "
"ssl_num_locks '%d' - n '%d'\n",
- ssl_num_locks, n);
- return;
- }
-
- if (mode & CRYPTO_LOCK) {
- ast_mutex_lock(&ssl_locks[n]);
- } else {
- ast_mutex_unlock(&ssl_locks[n]);
- }
+ ssl_num_locks, n);
+ return;
+ }
+
+ if (mode & CRYPTO_LOCK) {
+ ast_mutex_lock(&ssl_locks[n]);
+ } else {
+ ast_mutex_unlock(&ssl_locks[n]);
+ }
}
#endif /* HAVE_OPENSSL */
@@ -73,28 +73,28 @@ static void ssl_lock(int mode, int n, const char *file, int line)
int ast_ssl_init(void)
{
#ifdef HAVE_OPENSSL
- unsigned int i;
+ unsigned int i;
- SSL_library_init();
- SSL_load_error_strings();
- ERR_load_crypto_strings();
- ERR_load_BIO_strings();
- OpenSSL_add_all_algorithms();
+ SSL_library_init();
+ SSL_load_error_strings();
+ ERR_load_crypto_strings();
+ ERR_load_BIO_strings();
+ OpenSSL_add_all_algorithms();
- /* Make OpenSSL thread-safe. */
+ /* Make OpenSSL thread-safe. */
- CRYPTO_set_id_callback(ssl_threadid);
+ CRYPTO_set_id_callback(ssl_threadid);
- ssl_num_locks = CRYPTO_num_locks();
- if (!(ssl_locks = ast_calloc(ssl_num_locks, sizeof(ssl_locks[0])))) {
- return -1;
- }
- for (i = 0; i < ssl_num_locks; i++) {
- ast_mutex_init(&ssl_locks[i]);
- }
- CRYPTO_set_locking_callback(ssl_lock);
+ ssl_num_locks = CRYPTO_num_locks();
+ if (!(ssl_locks = ast_calloc(ssl_num_locks, sizeof(ssl_locks[0])))) {
+ return -1;
+ }
+ for (i = 0; i < ssl_num_locks; i++) {
+ ast_mutex_init(&ssl_locks[i]);
+ }
+ CRYPTO_set_locking_callback(ssl_lock);
#endif /* HAVE_OPENSSL */
- return 0;
+ return 0;
}