35 #include <openssl/ssl.h>
36 #include <openssl/err.h>
52 return (
unsigned long)pthread_self();
55 static void ssl_lock(
int mode,
int n,
const char *file,
int line)
57 if (n < 0 || n >= ssl_num_locks) {
59 "ssl_num_locks '%d' - n '%d'\n",
64 if (mode & CRYPTO_LOCK) {
83 SSL_load_error_strings();
84 ERR_load_BIO_strings();
90 ssl_num_locks = CRYPTO_num_locks();
91 if (!(ssl_locks =
ast_calloc(ssl_num_locks,
sizeof(ssl_locks[0])))) {
97 CRYPTO_set_locking_callback(
ssl_lock);
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
static void ssl_lock(int mode, int n, const char *file, int line)
#define ast_mutex_lock(a)
static unsigned long ssl_threadid(void)
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Prototypes for public functions only of internal interest,.
static ast_mutex_t * ssl_locks
#define ast_mutex_init(pmutex)
Structure for mutex and tracking information.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
#define ast_mutex_unlock(a)