X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fsysdep.c;h=c547f9772be4cff4c5fee27c84291bfb8d93817a;hp=971d729c4c282de588a791b04dd7de96eddbd679;hb=27014176ee36ef29b80da016f3fd5772189f8377;hpb=0566e798cbfc711e22b2e7328ed1d07a14265313 diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 971d729c4..c547f9772 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -86,14 +86,14 @@ void init_sysdep(void) { init_ssl(); #endif - /* - * Set up a place to put thread-specific data. - * We only need a single pointer per thread - it points to the - * CitContext structure (in the ContextList linked list) of the - * session to which the calling thread is currently bound. - */ - if (pthread_key_create(&MyConKey, NULL) != 0) { + if (pthread_key_create(&ThreadKey, NULL) != 0) { // TSD for threads + syslog(LOG_ERR, "pthread_key_create() : %m"); + abort(); + } + + if (pthread_key_create(&MyConKey, NULL) != 0) { // TSD for sessions syslog(LOG_CRIT, "sysdep: can't create TSD key: %m"); + abort(); } /*