diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-11 21:36:29 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-11 21:36:29 +0300 |
commit | 617831dfc953a5bba630163c01fbeda11445ee78 (patch) | |
tree | be3eb09d61f5652989dcc134f89bab6aab70955e /protocols/MSN | |
parent | e57cdb681cb10993f4bd08c594a27278af478b1a (diff) |
mir_base64_* => parameters type fix
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 6 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapab.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_srv.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index df0e2542fe..228792b274 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -543,7 +543,7 @@ CMStringA CMsnProto::HotmailLogin(const char* url) unsigned char nonce[24];
Utils_GetRandom(nonce, sizeof(nonce));
- unsigned key1len;
+ size_t key1len;
mir_ptr<BYTE> key1((BYTE*)mir_base64_decode(hotSecretToken, &key1len));
static const unsigned char encdata[] = "WS-SecureConversation";
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 5bf2bb2aa3..9a7f7157bf 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -119,7 +119,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) ezxml_t xmli = ezxml_parse_str(NEWSTR_ALLOCA(szContext), mir_strlen(szContext));
const char *szAvatarHash = ezxml_attr(xmli, "SHA1D");
if (szAvatarHash != nullptr) {
- unsigned hashLen;
+ size_t hashLen;
mir_ptr<BYTE> hash((BYTE*)mir_base64_decode(szAvatarHash, &hashLen));
if (hash)
res = arrayToHex(hash, hashLen);
@@ -217,7 +217,7 @@ int CMsnProto::MSN_SetMyAvatar(const wchar_t* sztFname, void* pData, size_t cbLe mir_sha1_append(&sha1ctx, (BYTE*)pData, (int)cbLen);
mir_sha1_finish(&sha1ctx, sha1d);
- ptrA szSha1d(mir_base64_encode((PBYTE)sha1d, sizeof(sha1d)));
+ ptrA szSha1d(mir_base64_encode(sha1d, sizeof(sha1d)));
mir_sha1_init(&sha1ctx);
ezxml_t xmlp = ezxml_new("msnobj");
@@ -250,7 +250,7 @@ int CMsnProto::MSN_SetMyAvatar(const wchar_t* sztFname, void* pData, size_t cbLe mir_sha1_finish(&sha1ctx, sha1c);
- ptrA szSha1c(mir_base64_encode((PBYTE)sha1c, sizeof(sha1c)));
+ ptrA szSha1c(mir_base64_encode(sha1c, sizeof(sha1c)));
// ezxml_set_attr(xmlp, "SHA1C", szSha1c);
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index 2f82ab7a1c..fa55291a53 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -812,7 +812,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas }
if (!msnLoggedIn && msnNsThread) {
char *szCircleTicket = ezxml_txt(ezxml_get(body, "CircleResult", 0, "CircleTicket", -1));
- ptrA szCircleTicketEnc(mir_base64_encode((PBYTE)szCircleTicket, (unsigned)mir_strlen(szCircleTicket)));
+ ptrA szCircleTicketEnc(mir_base64_encode(szCircleTicket, mir_strlen(szCircleTicket)));
if (szCircleTicketEnc)
msnNsThread->sendPacket("USR", "SHA A %s", szCircleTicketEnc);
}
diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index 35401b533a..35e35259e8 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -296,7 +296,7 @@ void CMsnProto::msn_storeAvatarThread(void* arg) ptrA szEncBuf;
if (dat)
- szEncBuf = mir_base64_encode(dat->data, (unsigned)dat->dataSize);
+ szEncBuf = mir_base64_encode(dat->data, dat->dataSize);
if (photoid[0] && dat)
MSN_StoreUpdateDocument(dat->szName, dat->szMimeType, szEncBuf);
|