summaryrefslogtreecommitdiff
path: root/protocols/MSN/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2018-03-06 20:24:07 +0300
committerKirill Volinsky <mataes2007@gmail.com>2018-03-07 12:54:58 +0300
commitbebafc42ab6199e86d4c2c901fac8d091bfffef0 (patch)
treef3961879845e89688c6628dccf1a3c9cd3ebb9b3 /protocols/MSN/src
parent7e9fef8a6ff35c63f9217fcc618d77f660e45245 (diff)
some fixes
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r--protocols/MSN/src/msn_auth.cpp2
-rw-r--r--protocols/MSN/src/msn_misc.cpp8
-rw-r--r--protocols/MSN/src/skylogin/login.c3
3 files changed, 6 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index e75fded15c..f9420029cd 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -1133,7 +1133,7 @@ int CMsnProto::MSN_AuthOAuth(void)
int loginRet;
/* Do Login via Skype login server, if not possible switch to SkypeWebExperience login */
if ((loginRet = LoginSkypeOAuth(pRefreshToken)) < 1) {
- if (loginRet < 0) bLogin = true; else retVal = 0;
+ retVal = 0;
}
else {
/* SkyLogin succeeded, request required tokens */
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index dc509db31b..78ec94f5dd 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -1025,13 +1025,11 @@ char* TWinErrorCode::getText()
if (mErrorText == nullptr)
return nullptr;
- int tBytes = 0;
mErrorText = (char*)mir_alloc(256);
- if (tBytes == 0)
- tBytes = FormatMessageA(
- FORMAT_MESSAGE_FROM_SYSTEM, nullptr,
- mErrorCode, LANG_NEUTRAL, mErrorText, 256, nullptr);
+ int tBytes = FormatMessageA(
+ FORMAT_MESSAGE_FROM_SYSTEM, nullptr,
+ mErrorCode, LANG_NEUTRAL, mErrorText, 256, nullptr);
if (tBytes == 0)
tBytes = mir_snprintf(mErrorText, 256, "unknown Windows error code %d", mErrorCode);
diff --git a/protocols/MSN/src/skylogin/login.c b/protocols/MSN/src/skylogin/login.c
index 406ebe279e..348c582b7b 100644
--- a/protocols/MSN/src/skylogin/login.c
+++ b/protocols/MSN/src/skylogin/login.c
@@ -74,7 +74,8 @@ static int SendAuthentificationBlobLS(Skype_Inst *pInst, LSConnection *pConn, co
uchar *Browser;
uchar *Mark;
uchar *MarkObjL;
- uint Idx, Size, Crc, BSize, ret = 0;
+ uint Size, Crc, BSize, ret = 0;
+ int Idx;
HttpsPacketHeader *HSHeader;
uchar HSHeaderBuf[sizeof(HttpsPacketHeader)], RecvBuf[0x1000];
AES_KEY AesKey;