diff options
-rw-r--r-- | protocols/MSN/msn.vcxproj | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn.cpp | 7 | ||||
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 7 | ||||
-rw-r--r-- | protocols/MSN/src/stdafx.h | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/protocols/MSN/msn.vcxproj b/protocols/MSN/msn.vcxproj index 603d726bdc..bca665bcf8 100644 --- a/protocols/MSN/msn.vcxproj +++ b/protocols/MSN/msn.vcxproj @@ -30,7 +30,8 @@ <ExceptionHandling>Sync</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <DelayLoadDLLs>libeay32.dll</DelayLoadDLLs>
+ <AdditionalDependencies>delayimp.lib;libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index 82054a4464..37b288cbf5 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "version.h"
CLIST_INTERFACE *pcli;
-HINSTANCE g_hInst;
+HINSTANCE g_hInst, g_hOpenssl;
int hLangpack;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -105,6 +105,8 @@ extern "C" int __declspec(dllexport) Load(void) mir_getLP(&pluginInfo);
mir_getCLI();
+ g_hOpenssl = LoadLibraryA("libeay32.dll");
+
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
PROTOCOLDESCRIPTOR pd = { 0 };
@@ -123,6 +125,9 @@ extern "C" int __declspec(dllexport) Load(void) // Unload a plugin
extern "C" int __declspec(dllexport) Unload(void)
{
+ if (g_hOpenssl)
+ FreeLibrary(g_hOpenssl);
+
MSN_RemoveContactMenus();
MsnLinks_Destroy();
return 0;
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index 3e05906b30..9bac895468 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -499,8 +499,7 @@ int CMsnProto::MSN_GetPassportAuth(void) }
}
}
- else
- setString("MsnPassportHost", szPassportHost);
+ else setString("MsnPassportHost", szPassportHost);
mir_free(szPassportHost);
debugLogA("MSN_CheckRedirector exited with errorCode = %d", retVal);
@@ -654,6 +653,8 @@ CMStringA CMsnProto::HotmailLogin(const char* url) int CMsnProto::MSN_SkypeAuth(const char *pszNonce, char *pszUIC)
{
int iRet = -1;
+ if (g_hOpenssl == NULL)
+ return iRet;
// Perform login
SkyLogin hLogin = SkyLogin_Init();
@@ -685,6 +686,8 @@ int CMsnProto::MSN_SkypeAuth(const char *pszNonce, char *pszUIC) int CMsnProto::LoginSkypeOAuth(const char *pRefreshToken)
{
int iRet = -1;
+ if (g_hOpenssl == NULL)
+ return iRet;
// Perform login
SkyLogin hLogin = SkyLogin_Init();
diff --git a/protocols/MSN/src/stdafx.h b/protocols/MSN/src/stdafx.h index b127c2cd39..4c01648788 100644 --- a/protocols/MSN/src/stdafx.h +++ b/protocols/MSN/src/stdafx.h @@ -934,7 +934,7 @@ const char msnStoreAppId[] = "Skype"; const char msnProductVer[] = "0/6.16.0.105/259/";
const char msnProtID[] = "MSNP24";
-extern HINSTANCE g_hInst;
+extern HINSTANCE g_hInst, g_hOpenssl;
extern bool g_bTerminated;
///////////////////////////////////////////////////////////////////////////////
|