diff options
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_chat.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_ieembed.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn_skypeab.cpp | 15 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapab.cpp | 2 |
7 files changed, 18 insertions, 16 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index c2956d09af..f7e12316e0 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -971,7 +971,7 @@ void CMsnProto::MSN_SendATH(ThreadData *info) "<user><ssl-compact-ticket>t=%s</ssl-compact-ticket>"
"<uic>%s</uic>"
"<id>%s</id><alias>%s</alias></user>\r\n",
- (const char*)authSSLToken ? ptrA(HtmlEncode(authSSLToken)) : "",
+ (const char*)authSSLToken ? ptrA(HtmlEncode(authSSLToken)).get() : "",
authUIC,
GetMyUsername(NETID_MSN), GetMyUsername(NETID_SKYPE));
break;
@@ -982,7 +982,7 @@ void CMsnProto::MSN_SendATH(ThreadData *info) "<uic>%s</uic>"
"<ssl-site-name>chatservice.live.com</ssl-site-name>"
"</user>\r\n",
- (const char*)authStrToken ? ptrA(HtmlEncode(authStrToken)) : "",
+ (const char*)authStrToken ? ptrA(HtmlEncode(authStrToken)).get() : "",
authUIC);
break;
}
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index b18124501a..61d6c44e52 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -141,7 +141,7 @@ void CMsnProto::MSN_Kickuser(GCHOOK *gch) GCThreadData *thread = MSN_GetThreadByChatId(gch->ptszID);
msnNsThread->sendPacketPayload("DEL", "MSGR\\THREAD",
"<thread><id>%d:%s</id><members><member><mri>%s</mri></member></members></thread>",
- thread->netId, thread->szEmail, _T2A(gch->ptszUID));
+ thread->netId, thread->szEmail, _T2A(gch->ptszUID).get());
}
void CMsnProto::MSN_Promoteuser(GCHOOK *gch, const char *pszRole)
@@ -149,7 +149,7 @@ void CMsnProto::MSN_Promoteuser(GCHOOK *gch, const char *pszRole) GCThreadData *thread = MSN_GetThreadByChatId(gch->ptszID);
msnNsThread->sendPacketPayload("PUT", "MSGR\\THREAD",
"<thread><id>%d:%s</id><members><member><mri>%s</mri><role>%s</role></member></members></thread>",
- thread->netId, thread->szEmail, _T2A(gch->ptszUID), pszRole);
+ thread->netId, thread->szEmail, _T2A(gch->ptszUID).get(), pszRole);
}
const wchar_t *CMsnProto::MSN_GCGetRole(GCThreadData* thread, const char *pszWLID)
diff --git a/protocols/MSN/src/msn_ieembed.cpp b/protocols/MSN/src/msn_ieembed.cpp index e094d4f722..c9b4b964a7 100644 --- a/protocols/MSN/src/msn_ieembed.cpp +++ b/protocols/MSN/src/msn_ieembed.cpp @@ -376,7 +376,7 @@ IHTMLDocument2* IEEmbed::getDocument() void IEEmbed::navigate(const wchar_t *url)
{
- pWebBrowser->Navigate((WCHAR *)url, nullptr, nullptr, nullptr, nullptr);
+ pWebBrowser->Navigate((BSTR)url, nullptr, nullptr, nullptr, nullptr);
}
void IEEmbed::navigate(char *url)
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index d38ac42e3c..a52bbbcbe6 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -145,7 +145,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) // MSN_GetAvatarFileName - gets a file name for an contact's avatar
void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t cbLen, const wchar_t *ext)
{
- size_t tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%S", VARSW(L"%miranda_avatarcache%"), m_szModuleName);
+ size_t tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%S", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName);
if (_waccess(pszDest, 0))
CreateDirectoryTreeW(pszDest);
@@ -637,7 +637,7 @@ void CMsnProto::MSN_SetServerStatus(int newStatus) szStatusName,
MyOptions.szMachineGuid, myFlags, myFlagsEx, myFlagsExEx,
MyOptions.szMachineGuid, szPlace,
- msgptr?ptrA(HtmlEncode(*msgptr)):"", GetMyUsername(NETID_SKYPE),
+ msgptr ? ptrA(HtmlEncode(*msgptr)).get() : "", GetMyUsername(NETID_SKYPE),
MyOptions.szMachineGuid,
MyOptions.szMachineGuid);
msnNsThread->sendPacketPayload("PUT", "MSGR\\PRESENCE",
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 24bd25f121..1ab70262a8 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -830,7 +830,8 @@ int CMsnProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hCo msg.Append("<contacts alt=\"[Contacts enclosed. Please upgrade to latest Skype version to receive contacts.]\">");
for (int i = 0; i < nContacts; i++) {
ptrA wlid(getStringA(hContactsList[i], "wlid"));
- if (wlid != NULL) msg.AppendFormat("<c t=\"s\" s=\"%s\"/>", wlid);
+ if (wlid != NULL)
+ msg.AppendFormat("<c t=\"s\" s=\"%s\"/>", wlid.get());
}
msg.Append("</contacts>");
seq = msnNsThread->sendMessage('1', tEmail, netId, msg, MSG_CONTACT);
diff --git a/protocols/MSN/src/msn_skypeab.cpp b/protocols/MSN/src/msn_skypeab.cpp index eb5fa20886..6de0e34483 100644 --- a/protocols/MSN/src/msn_skypeab.cpp +++ b/protocols/MSN/src/msn_skypeab.cpp @@ -146,7 +146,7 @@ bool CMsnProto::MSN_SKYABGetProfiles(const char *pszPOST) ptrA skypename(mir_u2a(ptrW(json_as_string(node))));
ptrW value;
char szWLId[128];
- mir_snprintf(szWLId, sizeof(szWLId), "%d:%s", NETID_SKYPE, skypename);
+ mir_snprintf(szWLId, sizeof(szWLId), "%d:%s", NETID_SKYPE, skypename.get());
MCONTACT hContact = MSN_HContactFromEmail(szWLId, skypename, false, false);
if (hContact) {
@@ -192,7 +192,7 @@ bool CMsnProto::MSN_SKYABGetProfile(const char *wlid) ptrA skypename(mir_u2a(ptrW(json_as_string(json_get(item, "username")))));
ptrW value;
char szWLId[128];
- mir_snprintf(szWLId, sizeof(szWLId), "%d:%s", NETID_SKYPE, skypename);
+ mir_snprintf(szWLId, sizeof(szWLId), "%d:%s", NETID_SKYPE, skypename.get());
MCONTACT hContact = MSN_HContactFromEmail(szWLId, skypename, false, false);
if (hContact) {
@@ -202,12 +202,13 @@ bool CMsnProto::MSN_SKYABGetProfile(const char *wlid) if (value = get_json_str(item, "gender")) setByte(hContact, "Gender", (BYTE)(_wtoi(value) == 1 ? 'M' : 'F'));
if (value = get_json_str(item, "birthday")) {
int d, m, y;
- swscanf(value, L"%d-%d-%d", &y, &m, &d);
- setWord(hContact, "BirthYear", y);
- setByte(hContact, "BirthDay", d);
- setByte(hContact, "BirthMonth", m);
+ if (swscanf(value, L"%d-%d-%d", &y, &m, &d) == 3) {
+ setWord(hContact, "BirthYear", y);
+ setByte(hContact, "BirthDay", d);
+ setByte(hContact, "BirthMonth", m);
+ }
}
- if (value = get_json_str(item, "country")) setString(hContact, "Country", (char*)CallService(MS_UTILS_GETCOUNTRYBYISOCODE, (WPARAM)(char*)_T2A(value), 0));
+ if (value = get_json_str(item, "country")) setString(hContact, "Country", (char*)CallService(MS_UTILS_GETCOUNTRYBYISOCODE, _T2A(value), 0));
if (value = get_json_str(item, "province")) setWString(hContact, "State", value);
if (value = get_json_str(item, "city")) setWString(hContact, "City", value);
if (value = get_json_str(item, "homepage")) setWString(hContact, "Homepage", value);
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index 6a98c797de..3b73664455 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -814,7 +814,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas char *szCircleTicket = ezxml_txt(ezxml_get(body, "CircleResult", 0, "CircleTicket", -1));
ptrA szCircleTicketEnc(mir_base64_encode(szCircleTicket, mir_strlen(szCircleTicket)));
if (szCircleTicketEnc)
- msnNsThread->sendPacket("USR", "SHA A %s", szCircleTicketEnc);
+ msnNsThread->sendPacket("USR", "SHA A %s", szCircleTicketEnc.get());
}
}
|