diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-02-03 05:49:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-02-03 05:49:16 +0000 |
commit | d23b9ca732986978d74bbf689c75d5a51f104ea7 (patch) | |
tree | 5530e755acbec82632cf894166cca5a4f7d229f0 | |
parent | 296760de58c6f287c71fd994e07f45d85495a716 (diff) | |
download | libmicrohttpd-d23b9ca732986978d74bbf689c75d5a51f104ea7.tar.gz libmicrohttpd-d23b9ca732986978d74bbf689c75d5a51f104ea7.zip |
initialize mutex'
'
-rw-r--r-- | src/daemon/daemon.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index cf4d192e..8bfce082 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -1139,10 +1139,18 @@ void __attribute__ ((constructor)) MHD_pthread_handlers_ltdl_init () | |||
1139 | sig.sa_flags = SA_NODEFER; | 1139 | sig.sa_flags = SA_NODEFER; |
1140 | sig.sa_handler = &sigalrmHandler; | 1140 | sig.sa_handler = &sigalrmHandler; |
1141 | sigaction (SIGALRM, &sig, &old); | 1141 | sigaction (SIGALRM, &sig, &old); |
1142 | #if HTTPS_SUPPORT | ||
1143 | if (0 != pthread_mutex_init(&MHD_gnutls_init_mutex, NULL)) | ||
1144 | abort(); | ||
1145 | #endif | ||
1142 | } | 1146 | } |
1143 | 1147 | ||
1144 | void __attribute__ ((destructor)) MHD_pthread_handlers_ltdl_fini () | 1148 | void __attribute__ ((destructor)) MHD_pthread_handlers_ltdl_fini () |
1145 | { | 1149 | { |
1150 | #if HTTPS_SUPPORT | ||
1151 | if (0 != pthread_mutex_destroy(&MHD_gnutls_init_mutex)) | ||
1152 | abort (); | ||
1153 | #endif | ||
1146 | sigaction (SIGALRM, &old, &sig); | 1154 | sigaction (SIGALRM, &old, &sig); |
1147 | } | 1155 | } |
1148 | 1156 | ||