From: Luke Howard Date: Tue, 13 Sep 2011 06:28:51 +0000 (+1000) Subject: call eap_mech constructors from DllMain X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.orig;a=commitdiff_plain;h=7a796448997e185aa509ae195c719f834ed58500 call eap_mech constructors from DllMain --- diff --git a/mech_eap/eap_mech.c b/mech_eap/eap_mech.c index 630dd0e..0b64df9 100644 --- a/mech_eap/eap_mech.c +++ b/mech_eap/eap_mech.c @@ -165,10 +165,10 @@ gssEapInitLibRadsec(OM_uint32 *minor) return GSS_S_COMPLETE; } -static void gssEapInitiatorInit(void) GSSEAP_CONSTRUCTOR; -static void gssEapFinalize(void) GSSEAP_DESTRUCTOR; +void gssEapInitiatorInit(void) GSSEAP_CONSTRUCTOR; +void gssEapFinalize(void) GSSEAP_DESTRUCTOR; -static void +void gssEapInitiatorInit(void) { OM_uint32 major, minor; @@ -188,7 +188,7 @@ gssEapInitiatorInit(void) #endif } -static void +void gssEapFinalize(void) { #ifdef GSSEAP_ENABLE_ACCEPTOR diff --git a/mech_eap/gssapiP_eap.h b/mech_eap/gssapiP_eap.h index 50884ec..5d352a9 100644 --- a/mech_eap/gssapiP_eap.h +++ b/mech_eap/gssapiP_eap.h @@ -335,6 +335,13 @@ gssEapExportSecContext(OM_uint32 *minor, gss_buffer_t token); +/* eap_mech.c */ +void +gssEapInitiatorInit(void); + +void +gssEapFinalize(void); + #ifdef __cplusplus } #endif diff --git a/mech_eap/util_tld.c b/mech_eap/util_tld.c index 38e6a10..2e1ddfa 100644 --- a/mech_eap/util_tld.c +++ b/mech_eap/util_tld.c @@ -74,6 +74,7 @@ DllMain(HINSTANCE hDLL, /* DLL module handle */ switch (reason) { case DLL_PROCESS_ATTACH: /* Allocate a TLS index. */ + gssEapInitiatorInit(); tlsIndex = TlsAlloc(); if (tlsIndex == TLS_OUT_OF_INDEXES) return FALSE; @@ -99,6 +100,7 @@ DllMain(HINSTANCE hDLL, /* DLL module handle */ destroyThreadLocalData(tlsData); /* Release the TLS index. */ TlsFree(tlsIndex); + gssEapFinalize(); break; default: break;