diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:06:32 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:06:32 +0000 |
commit | 5a17c9299e03bebf46169927abdeee34aaf8e854 (patch) | |
tree | cbd13080f33ac0b6396b9d3b8ba31a3c98de59f8 /protocols/MSN | |
parent | ed64312924e77707e7e5b5965c301692519f293a (diff) |
replace strlen to mir_strlen
git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 12 | ||||
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 46 | ||||
-rw-r--r-- | protocols/MSN/src/msn_ftold.cpp | 8 | ||||
-rw-r--r-- | protocols/MSN/src/msn_libstr.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_mail.cpp | 10 | ||||
-rw-r--r-- | protocols/MSN/src/msn_menu.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_mime.cpp | 8 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 44 | ||||
-rw-r--r-- | protocols/MSN/src/msn_opts.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_p2p.cpp | 8 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 26 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapab.cpp | 32 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapstore.cpp | 26 | ||||
-rw-r--r-- | protocols/MSN/src/msn_ssl.cpp | 2 |
14 files changed, 117 insertions, 117 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index ae8bc6814b..b54ef2c1ba 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -186,7 +186,7 @@ int CMsnProto::MSN_GetPassportAuth(void) const char *errurl;
{
errurl = NULL;
- ezxml_t xml = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xml = ezxml_parse_str(tResult, mir_strlen(tResult));
ezxml_t tokr = ezxml_get(xml, "S:Body", 0,
"wst:RequestSecurityTokenResponseCollection", 0,
@@ -389,7 +389,7 @@ char* CMsnProto::GenerateLoginBlob(char* challenge) derive_key(key2, key1, key1len, (unsigned char*)encdata1, sizeof(encdata1) - 1);
derive_key(key3, key1, key1len, (unsigned char*)encdata2, sizeof(encdata2) - 1);
- size_t chllen = strlen(challenge);
+ size_t chllen = mir_strlen(challenge);
BYTE hash[MIR_SHA1_HASH_SIZE];
mir_hmac_sha1(hash, key2, MIR_SHA1_HASH_SIZE + 4, (BYTE*)challenge, chllen);
@@ -576,7 +576,7 @@ static int CopyCookies(NETLIBHTTPREQUEST *nlhrReply, NETLIBHTTPHEADER *hdr) if (*hdr->szValue) strcat (hdr->szValue, "; ");
strcat (hdr->szValue, nlhrReply->headers[i].szValue);
}
- else nSize += (int)strlen(nlhrReply->headers[i].szValue) + 2;
+ else nSize += (int)mir_strlen(nlhrReply->headers[i].szValue) + 2;
}
return nSize;
}
@@ -618,7 +618,7 @@ bool CMsnProto::RefreshOAuth(const char *pszRefreshToken, const char *pszService ptrA(mir_urlEncode(pszService)), pszRefreshToken);
nlhr.pData = (char*)(const char*)post;
- nlhr.dataLength = (int)strlen(nlhr.pData);
+ nlhr.dataLength = (int)mir_strlen(nlhr.pData);
nlhr.szUrl = "https://login.live.com/oauth20_token.srf";
// Query
@@ -783,7 +783,7 @@ int CMsnProto::MSN_AuthOAuth(void) nlhr.requestType = REQUEST_POST;
nlhr.flags &= (~NLHRF_REDIRECT);
mHttpsTS = clock();
- nlhr.dataLength = (int)strlen(post);
+ nlhr.dataLength = (int)mir_strlen(post);
nlhr.pData = (char*)(const char*)post;
nlhr.nlc = hHttpsConnection;
NETLIBHTTPREQUEST *nlhrReply2 = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
@@ -848,7 +848,7 @@ int CMsnProto::MSN_AuthOAuth(void) /* Prepare headers*/
nlhr.headers[2].szValue = "application/json";
nlhr.pData = "{\"trouterurl\":\"https://\",\"connectionid\":\"a\"}";
- nlhr.dataLength = (int)strlen(nlhr.pData);
+ nlhr.dataLength = (int)mir_strlen(nlhr.pData);
nlhr.szUrl = "https://skypewebexperience.live.com/v1/User/Initialization";
nlhr.nlc = hHttpsConnection;
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index 0f3cd8db04..e4fc9428e1 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -145,7 +145,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para buf.AppendFormat("Ack-Id: %s\r\n", tHeader["Ack-Id"]);
if (msnRegistration) buf.AppendFormat("Registration: %s\r\n", msnRegistration);
buf.AppendFormat("\r\n");
- msnNsThread->sendPacket("ACK", "MSGR %d\r\n%s", strlen(buf), buf);
+ msnNsThread->sendPacket("ACK", "MSGR %d\r\n%s", mir_strlen(buf), buf);
}
msgBody = tHeader.readFromBuffer(msgBody);
if (!(email = NEWSTR_ALLOCA(tHeader["From"]))) return;
@@ -173,7 +173,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para if (tChunks)
idx = addCachedMsg(tMsgId, msg, 0, msgBytes, atol(tChunks), true);
else
- idx = addCachedMsg(tMsgId, msgBody, 0, strlen(msgBody), 0, true);
+ idx = addCachedMsg(tMsgId, msgBody, 0, mir_strlen(msgBody), 0, true);
size_t newsize;
if (!getCachedMsg(idx, newbody, newsize)) return;
@@ -214,7 +214,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para MCONTACT hContact = strncmp(email, "19:", 3)?MSN_HContactFromEmail(email, nick, true, true):NULL;
if (!_stricmp(tHeader["Message-Type"], "RichText/Contacts")) {
- ezxml_t xmli = ezxml_parse_str(msgBody, strlen(msgBody));
+ ezxml_t xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody));
if (xmli) {
if (!strcmp(xmli->name, "contacts")) {
ezxml_t c;
@@ -275,7 +275,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para const char* tP4Context = tHeader["P4-Context"];
if (tP4Context) {
- size_t newlen = strlen(msgBody) + strlen(tP4Context) + 4;
+ size_t newlen = mir_strlen(msgBody) + mir_strlen(tP4Context) + 4;
char* newMsgBody = (char*)mir_alloc(newlen);
mir_snprintf(newMsgBody, newlen, "[%s] %s", tP4Context, msgBody);
mir_free(newbody);
@@ -284,7 +284,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para if (mChatID[0]) {
if (!_strnicmp(tHeader["Message-Type"], "ThreadActivity/", 15)) {
- ezxml_t xmli = ezxml_parse_str(msgBody, strlen(msgBody));
+ ezxml_t xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody));
if (xmli) {
MSN_GCProcessThreadActivity(xmli, mChatID);
ezxml_free(xmli);
@@ -312,7 +312,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para dbei.flags = DBEF_SENT | DBEF_UTF | (haveWnd ? 0 : DBEF_READ) | (isRtl ? DBEF_RTL : 0);
dbei.szModule = m_szModuleName;
dbei.timestamp = time(NULL);
- dbei.cbBlob = (unsigned)strlen(msgBody) + 1;
+ dbei.cbBlob = (unsigned)mir_strlen(msgBody) + 1;
dbei.pBlob = (PBYTE)msgBody;
db_event_add(hContact, &dbei);
}
@@ -680,14 +680,14 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid) size_t lenPart = mir_snprintf(part, SIZEOF(part), "{%d}", i - 4);
if (parts[i][0] == '\0' && unknown != NULL)
parts[i] = unknown;
- size_t lenPartsI = strlen(parts[i]);
+ size_t lenPartsI = mir_strlen(parts[i]);
for (p = strstr(format, part); p; p = strstr(p + lenPartsI, part)) {
if (lenPart < lenPartsI) {
int loc = p - format;
- format = (char *)mir_realloc(format, strlen(format) + (lenPartsI - lenPart) + 1);
+ format = (char *)mir_realloc(format, mir_strlen(format) + (lenPartsI - lenPart) + 1);
p = format + loc;
}
- memmove(p + lenPartsI, p + lenPart, strlen(p + lenPart) + 1);
+ memmove(p + lenPartsI, p + lenPart, mir_strlen(p + lenPart) + 1);
memmove(p, parts[i], lenPartsI);
}
}
@@ -827,7 +827,7 @@ LBL_InvalidCommand: "<epid>%.*s</epid></msgr>\r\n",
msnP24Ver, (msnP24Ver>1?"<altVersions><ver>1</ver></altVersions>":""),
msnStoreAppId, msnProductVer,
- strlen(MyOptions.szMachineGuid)-2, MyOptions.szMachineGuid+1);
+ mir_strlen(MyOptions.szMachineGuid)-2, MyOptions.szMachineGuid+1);
bSentBND = true;
}
else
@@ -859,7 +859,7 @@ LBL_InvalidCommand: replaceStr(msnRegistration,tHeader["Set-Registration"]);
if (!strcmp(data.typeId, "CON")) {
- ezxml_t xmlbnd = ezxml_parse_str(msgBody, strlen(msgBody));
+ ezxml_t xmlbnd = ezxml_parse_str(msgBody, mir_strlen(msgBody));
ezxml_t xmlbdy = ezxml_child(xmlbnd, "nonce");
if (xmlbdy)
{
@@ -920,7 +920,7 @@ LBL_InvalidCommand: } else {
/* Skype username/pass login */
- ezxml_t xmlcnt = ezxml_parse_str(msgBody, strlen(msgBody));
+ ezxml_t xmlcnt = ezxml_parse_str(msgBody, mir_strlen(msgBody));
ezxml_t xmlnonce = ezxml_child(xmlcnt, "nonce");
if (xmlnonce) {
char szUIC[1024]={0};
@@ -958,7 +958,7 @@ LBL_InvalidCommand: ezxml_t xmli;
if (tHeader["Set-Registration"]) replaceStr(msnRegistration,tHeader["Set-Registration"]);
- if (xmli = ezxml_parse_str(msgBody, strlen(msgBody)))
+ if (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))
{
if (!strcmp(xmli->name, "recentconversations-response"))
{
@@ -1027,7 +1027,7 @@ LBL_InvalidCommand: stripHTML(message);
HtmlDecode(message);
} else if (!strncmp(msgtype->txt, "ThreadActivity/", 15)) {
- if (ezxml_t xmlact = ezxml_parse_str(content->txt, strlen(content->txt))) {
+ if (ezxml_t xmlact = ezxml_parse_str(content->txt, mir_strlen(content->txt))) {
MSN_GCProcessThreadActivity(xmlact, _A2T(id->txt));
ezxml_free(xmlact);
}
@@ -1046,7 +1046,7 @@ LBL_InvalidCommand: MEVENT hDbEvent;
bool bDuplicate = false;
DBEVENTINFO dbei = { sizeof(dbei) };
- DWORD cbBlob = (DWORD)strlen(message);
+ DWORD cbBlob = (DWORD)mir_strlen(message);
dbei.cbBlob = cbBlob;
BYTE *pszMsgBuf = (BYTE*)mir_calloc(cbBlob);
if (pszMsgBuf) {
@@ -1076,7 +1076,7 @@ LBL_InvalidCommand: dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = m_szModuleName;
dbei.timestamp = ts;
- dbei.cbBlob = (unsigned)strlen(message) + 1;
+ dbei.cbBlob = (unsigned)mir_strlen(message) + 1;
dbei.pBlob = (PBYTE)message;
db_event_add(hContact, &dbei);
}
@@ -1122,7 +1122,7 @@ LBL_InvalidCommand: } else if (!strcmp(data.typeId, "MSGR\\ABCH")) {
MimeHeaders tHeader;
msgBody = tHeader.readFromBuffer(msgBody);
- MSN_ProcessNotificationMessage(msgBody, strlen(msgBody));
+ MSN_ProcessNotificationMessage(msgBody, mir_strlen(msgBody));
break;
}
@@ -1139,7 +1139,7 @@ LBL_InvalidCommand: if (pszFrom)
{
ezxml_t xmli;
- if (xmli = ezxml_parse_str(msgBody, strlen(msgBody)))
+ if (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))
{
if (!strcmp(xmli->name, "user"))
{
@@ -1164,7 +1164,7 @@ LBL_InvalidCommand: char *msgBody = tHeader.readFromBuffer(info->mData);
ezxml_t xmli;
- if (xmli = ezxml_parse_str(msgBody, strlen(msgBody)))
+ if (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))
{
MSN_ChatStart(xmli);
ezxml_free(xmli);
@@ -1190,7 +1190,7 @@ LBL_InvalidCommand: if (tHeader["Set-Registration"]) replaceStr(msnRegistration,tHeader["Set-Registration"]);
if (cmdString[1]=='N') { // PNG
- if (ezxml_t xmli = ezxml_parse_str(msgBody, strlen(msgBody))) {
+ if (ezxml_t xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody))) {
if (ezxml_t wait = ezxml_child(xmli, "wait")) {
msnPingTimeout = atoi(ezxml_txt(wait));
if (msnPingTimeout && hKeepAliveThreadEvt != NULL)
@@ -1200,7 +1200,7 @@ LBL_InvalidCommand: }
} else { // PUT
ezxml_t xmli;
- if (*msgBody && (xmli = ezxml_parse_str(msgBody, strlen(msgBody)))) {
+ if (*msgBody && (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))) {
if (!strcmp(xmli->name, "presence-response")) {
ezxml_t user, from;
if ((user = ezxml_child(xmli, "user")) && (from = ezxml_child(xmli, "from"))) {
@@ -1239,7 +1239,7 @@ LBL_InvalidCommand: HReadBuffer buf(info, 0);
char* msgBody = tHeader.readFromBuffer((char*)buf.surelyRead(atol(data.strMsgBytes)));
if (!strcmp(data.typeId, "CON")) {
- ezxml_t xmlxfr = ezxml_parse_str(msgBody, strlen(msgBody));
+ ezxml_t xmlxfr = ezxml_parse_str(msgBody, mir_strlen(msgBody));
ezxml_t xmltgt = ezxml_child(xmlxfr, "target");
if (xmltgt)
{
@@ -1514,7 +1514,7 @@ void CMsnProto::MSN_CustomSmiley(const char* msgBody, char* email, char* nick, i memcpy(ft->p2p_object, tok1, sz);
ft->p2p_object[sz] = 0;
- size_t slen = strlen(lastsml);
+ size_t slen = mir_strlen(lastsml);
ptrA buf(mir_base64_encode((PBYTE)lastsml, (unsigned)slen));
ptrA smileyName(mir_urlEncode(buf));
diff --git a/protocols/MSN/src/msn_ftold.cpp b/protocols/MSN/src/msn_ftold.cpp index dfd2e296c7..f30b06bb66 100644 --- a/protocols/MSN/src/msn_ftold.cpp +++ b/protocols/MSN/src/msn_ftold.cpp @@ -37,7 +37,7 @@ void CMsnProto::msnftp_sendAcceptReject(filetransfer *ft, bool acc) "Invitation-Cookie: %s\r\n"
"Launch-Application: FALSE\r\n"
"Request-Data: IP-Address:\r\n\r\n",
- 172 + 4 + strlen(ft->szInvcookie), ft->szInvcookie);
+ 172 + 4 + mir_strlen(ft->szInvcookie), ft->szInvcookie);
}
else {
thread->sendPacket("MSG",
@@ -46,7 +46,7 @@ void CMsnProto::msnftp_sendAcceptReject(filetransfer *ft, bool acc) "Invitation-Command: CANCEL\r\n"
"Invitation-Cookie: %s\r\n"
"Cancel-Code: REJECT\r\n\r\n",
- 172 - 33 + 4 + strlen(ft->szInvcookie), ft->szInvcookie);
+ 172 - 33 + 4 + mir_strlen(ft->szInvcookie), ft->szInvcookie);
}
}
@@ -181,7 +181,7 @@ LBL_InvalidCommand: }
else if (info->mCaller == 2) { //send
static const char sttCommand[] = "VER MSNFTP\r\n";
- info->send(sttCommand, strlen(sttCommand));
+ info->send(sttCommand, mir_strlen(sttCommand));
}
break;
@@ -210,7 +210,7 @@ LBL_Error: if (tIsTransitionFinished) {
LBL_Success:
static const char sttCommand[] = "BYE 16777989\r\n";
- info->send(sttCommand, strlen(sttCommand));
+ info->send(sttCommand, mir_strlen(sttCommand));
return 1;
}
diff --git a/protocols/MSN/src/msn_libstr.cpp b/protocols/MSN/src/msn_libstr.cpp index a77a343a2d..f67299fa4c 100644 --- a/protocols/MSN/src/msn_libstr.cpp +++ b/protocols/MSN/src/msn_libstr.cpp @@ -63,7 +63,7 @@ bool txtParseParam(const char* szData, const char* presearch, const char* start, cp = strstr(cp1, start);
if (cp == NULL) return false;
- cp += strlen(start);
+ cp += mir_strlen(start);
while (*cp == ' ') ++cp;
if (finish) {
@@ -338,7 +338,7 @@ char* getNewUuid(void) BYTE *p;
UuidToStringA(&id, &p);
- size_t len = strlen((char*)p) + 3;
+ size_t len = mir_strlen((char*)p) + 3;
char *result = (char*)mir_alloc(len);
mir_snprintf(result, len, "{%s}", p);
_strupr(result);
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 77d5d9600c..984e8fe8b2 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -45,7 +45,7 @@ ezxml_t CMsnProto::oimRecvHdr(const char* service, ezxml_t& tbdy, char*& httphdr tbdy = ezxml_add_child(bdy, service, 0);
ezxml_set_attr(tbdy, "xmlns", "http://www.hotmail.msn.com/ws/2004/09/oim/rsi");
- size_t hdrsz = strlen(service) + sizeof(mailReqHdr) + 20;
+ size_t hdrsz = mir_strlen(service) + sizeof(mailReqHdr) + 20;
httphdr = (char*)mir_alloc(hdrsz);
mir_snprintf(httphdr, hdrsz, mailReqHdr, service);
@@ -88,7 +88,7 @@ void CMsnProto::getOIMs(ezxml_t xmli) mir_free(url);
if (tResult != NULL && status == 200) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
ezxml_t body = getSoapResponse(xmlm, "GetMessage");
MimeHeaders mailInfo;
@@ -168,7 +168,7 @@ void CMsnProto::getMetaData(void) mir_free(getReqHdr);
if (tResult != NULL && status == 200) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
ezxml_t xmli = ezxml_get(xmlm, "s:Body", 0, "GetMetadataResponse", 0, "MD", -1);
if (!xmli)
xmli = ezxml_get(xmlm, "soap:Body", 0, "GetMetadataResponse", 0, "MD", -1);
@@ -186,7 +186,7 @@ void CMsnProto::processMailData(char* mailData) getMetaData();
}
else {
- ezxml_t xmli = ezxml_parse_str(mailData, strlen(mailData));
+ ezxml_t xmli = ezxml_parse_str(mailData, mir_strlen(mailData));
ezxml_t toke = ezxml_child(xmli, "E");
@@ -357,7 +357,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) static void TruncUtf8(char *str, size_t sz)
{
- size_t len = strlen(str);
+ size_t len = mir_strlen(str);
if (sz > len) sz = len;
size_t cntl = 0, cnt = 0;
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index fc1eb5441d..c596f06b87 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -274,7 +274,7 @@ void CMsnProto::MsnInitMainMenu(void) {
char servicefunction[100];
strcpy(servicefunction, m_szModuleName);
- char* tDest = servicefunction + strlen(servicefunction);
+ char* tDest = servicefunction + mir_strlen(servicefunction);
CLISTMENUITEM mi = { sizeof(mi) };
@@ -410,7 +410,7 @@ void MSN_InitContactMenu(void) {
char servicefunction[100];
strcpy(servicefunction, "MSN");
- char* tDest = servicefunction + strlen(servicefunction);
+ char* tDest = servicefunction + mir_strlen(servicefunction);
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = servicefunction;
diff --git a/protocols/MSN/src/msn_mime.cpp b/protocols/MSN/src/msn_mime.cpp index 9a60356ab1..7545c5759d 100644 --- a/protocols/MSN/src/msn_mime.cpp +++ b/protocols/MSN/src/msn_mime.cpp @@ -111,7 +111,7 @@ void MimeHeaders::addBool(const char* name, bool lValue) char* MimeHeaders::flipStr(const char* src, size_t len, char* dest)
{
- if (len == -1) len = strlen(src);
+ if (len == -1) len = mir_strlen(src);
if (src == dest) {
const unsigned b = (unsigned)len-- / 2;
@@ -139,7 +139,7 @@ size_t MimeHeaders::getLength(void) size_t iResult = 0;
for (unsigned i = 0; i < mCount; i++) {
MimeHeader& H = mVals[i];
- iResult += strlen(H.name) + strlen(H.value) + 4;
+ iResult += mir_strlen(H.name) + mir_strlen(H.value) + 4;
}
return iResult + (iResult ? 2 : 0);
@@ -219,7 +219,7 @@ const char* MimeHeaders::find(const char* szFieldName) return MH.value;
}
- const size_t len = strlen(szFieldName);
+ const size_t len = mir_strlen(szFieldName);
char* szFieldNameR = (char*)alloca(len + 1);
flipStr(szFieldName, len, szFieldNameR);
@@ -400,7 +400,7 @@ static size_t utf8toutf16(char* str, wchar_t* res) wchar_t* MimeHeaders::decode(const char* val)
{
- size_t ssz = strlen(val) * 2 + 1;
+ size_t ssz = mir_strlen(val) * 2 + 1;
char* tbuf = (char*)alloca(ssz);
memcpy(tbuf, val, ssz);
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index ff7e203847..fcf168788d 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -89,13 +89,13 @@ void CMsnProto::MSN_AddAuthRequest(const char *email, const char *nick, const ch MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, true);
- int emaillen = (int)strlen(email);
+ int emaillen = (int)mir_strlen(email);
if (nick == NULL) nick = "";
- int nicklen = (int)strlen(nick);
+ int nicklen = (int)mir_strlen(nick);
if (reason == NULL) reason = "";
- int reasonlen = (int)strlen(reason);
+ int reasonlen = (int)mir_strlen(reason);
PROTORECVEVENT pre = { 0 };
pre.timestamp = (DWORD)time(NULL);
@@ -139,7 +139,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) char *res = NULL;
- ezxml_t xmli = ezxml_parse_str(NEWSTR_ALLOCA(szContext), strlen(szContext));
+ ezxml_t xmli = ezxml_parse_str(NEWSTR_ALLOCA(szContext), mir_strlen(szContext));
const char *szAvatarHash = ezxml_attr(xmli, "SHA1D");
if (szAvatarHash != NULL) {
unsigned hashLen;
@@ -248,13 +248,13 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen) ezxml_t xmlp = ezxml_new("msnobj");
mir_sha1_append(&sha1ctx, (PBYTE)"Creator", 7);
- mir_sha1_append(&sha1ctx, (PBYTE)MyOptions.szEmail, (int)strlen(MyOptions.szEmail));
+ mir_sha1_append(&sha1ctx, (PBYTE)MyOptions.szEmail, (int)mir_strlen(MyOptions.szEmail));
ezxml_set_attr(xmlp, "Creator", MyOptions.szEmail);
char szFileSize[20];
_ultoa((unsigned)cbLen, szFileSize, 10);
mir_sha1_append(&sha1ctx, (PBYTE)"Size", 4);
- mir_sha1_append(&sha1ctx, (PBYTE)szFileSize, (int)strlen(szFileSize));
+ mir_sha1_append(&sha1ctx, (PBYTE)szFileSize, (int)mir_strlen(szFileSize));
ezxml_set_attr(xmlp, "Size", szFileSize);
mir_sha1_append(&sha1ctx, (PBYTE)"Type", 4);
@@ -262,7 +262,7 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen) ezxml_set_attr(xmlp, "Type", "3");
mir_sha1_append(&sha1ctx, (PBYTE)"Location", 8);
- mir_sha1_append(&sha1ctx, (PBYTE)szFname, (int)strlen(szFname));
+ mir_sha1_append(&sha1ctx, (PBYTE)szFname, (int)mir_strlen(szFname));
ezxml_set_attr(xmlp, "Location", szFname);
mir_sha1_append(&sha1ctx, (PBYTE)"Friendly", 8);
@@ -270,7 +270,7 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen) ezxml_set_attr(xmlp, "Friendly", "AAA=");
mir_sha1_append(&sha1ctx, (PBYTE)"SHA1D", 5);
- mir_sha1_append(&sha1ctx, (PBYTE)(char*)szSha1d, (int)strlen(szSha1d));
+ mir_sha1_append(&sha1ctx, (PBYTE)(char*)szSha1d, (int)mir_strlen(szSha1d));
ezxml_set_attr(xmlp, "SHA1D", szSha1d);
mir_sha1_finish(&sha1ctx, sha1c);
@@ -506,7 +506,7 @@ int ThreadData::sendMessage(int msgType, const char* email, int netId, const cha pszMsgType,
pszNick,
pszContType,
- strlen(parMsg));
+ mir_strlen(parMsg));
if (*tFontName) buf.AppendFormat("X-MMS-IM-Format: FN=%s; EF=%s; CO=%x; CS=0; PF=31%s\r\n",
tFontName, tFontStyle, tFontColor, (parFlags & MSG_RTL) ? ";RL=1" : "");
@@ -530,10 +530,10 @@ int ThreadData::sendMessage(int msgType, const char* email, int netId, const cha #ifdef OBSOLETE
if (netId == NETID_YAHOO || netId == NETID_MOB || (parFlags & MSG_OFFLINE))
seq = sendPacket("UUM", "%s %d %c %d\r\n%s%s", email, netId, msgType,
- strlen(parMsg) + off, buf, parMsg);
+ mir_strlen(parMsg) + off, buf, parMsg);
else
seq = sendPacket("MSG", "%c %d\r\n%s%s", msgType,
- strlen(parMsg) + off, buf, parMsg);
+ mir_strlen(parMsg) + off, buf, parMsg);
#endif
return seq;
@@ -571,7 +571,7 @@ int ThreadData::sendRawMessage(int msgType, const char* data, int datLen) data = "";
if (datLen == -1)
- datLen = (int)strlen(data);
+ datLen = (int)mir_strlen(data);
char* buf = (char*)alloca(datLen + 100);
@@ -732,7 +732,7 @@ int ThreadData::sendPacket(const char* cmd, const char* fmt, ...) if (strchr(str, '\r') == NULL)
strcat(str, "\r\n");
- int result = send(str, strlen(str));
+ int result = send(str, mir_strlen(str));
mir_free(str);
return (result > 0) ? thisTrid : -1;
}
@@ -750,7 +750,7 @@ int ThreadData::sendPacketPayload(const char* cmd, const char *param, const char va_start(vararg, fmt);
thisTrid = InterlockedIncrement(&mTrid);
- int regSz = proto->msnRegistration ? (int)strlen(proto->msnRegistration)+16 : 0;
+ int regSz = proto->msnRegistration ? (int)mir_strlen(proto->msnRegistration)+16 : 0;
int paramStart = mir_snprintf(str, strsize, "%s %d %s ", cmd, thisTrid, param), strszstart = 0, strSz;
while ((strSz = mir_vsnprintf(str + paramStart, strsize - paramStart - regSz - 10, fmt, vararg)) == -1)
str = (char*)mir_realloc(str, strsize += 512);
@@ -762,7 +762,7 @@ int ThreadData::sendPacketPayload(const char* cmd, const char *param, const char str[strsize - 3] = 0;
va_end(vararg);
- int result = send(str, strlen(str));
+ int result = send(str, mir_strlen(str));
mir_free(str);
return (result > 0) ? thisTrid : -1;
}
@@ -1257,7 +1257,7 @@ char* directconnection::calcHashedNonce(UUID* nonce) char* p;
UuidToStringA((UUID*)&sha, (BYTE**)&p);
- size_t len = strlen(p) + 3;
+ size_t len = mir_strlen(p) + 3;
char* result = (char*)mir_alloc(len);
mir_snprintf(result, len, "{%s}", p);
_strupr(result);
@@ -1270,7 +1270,7 @@ char* directconnection::mNonceToText(void) {
char* p;
UuidToStringA(mNonce, (BYTE**)&p);
- size_t len = strlen(p) + 3;
+ size_t len = mir_strlen(p) + 3;
char* result = (char*)mir_alloc(len);
mir_snprintf(result, len, "{%s}", p);
_strupr(result);
@@ -1282,7 +1282,7 @@ char* directconnection::mNonceToText(void) void directconnection::xNonceToBin(UUID* nonce)
{
- size_t len = strlen(xNonce);
+ size_t len = mir_strlen(xNonce);
char *p = (char*)alloca(len);
strcpy(p, xNonce + 1);
p[len - 2] = 0;
@@ -1377,8 +1377,8 @@ void MSN_MakeDigest(const char* chl, char* dgst) DWORD md5hash[4], md5hashOr[4];
mir_md5_state_t context;
mir_md5_init(&context);
- mir_md5_append(&context, (BYTE*)chl, (int)strlen(chl));
- mir_md5_append(&context, (BYTE*)msnProtChallenge, (int)strlen(msnProtChallenge));
+ mir_md5_append(&context, (BYTE*)chl, (int)mir_strlen(chl));
+ mir_md5_append(&context, (BYTE*)msnProtChallenge, (int)mir_strlen(msnProtChallenge));
mir_md5_finish(&context, (BYTE*)md5hash);
memcpy(md5hashOr, md5hash, sizeof(md5hash));
@@ -1389,11 +1389,11 @@ void MSN_MakeDigest(const char* chl, char* dgst) char chlString[128];
mir_snprintf(chlString, SIZEOF(chlString), "%s%s00000000", chl, msnProductID);
- chlString[(strlen(chl) + strlen(msnProductID) + 7) & 0xF8] = 0;
+ chlString[(mir_strlen(chl) + mir_strlen(msnProductID) + 7) & 0xF8] = 0;
LONGLONG high = 0, low = 0;
int* chlStringArray = (int*)chlString;
- for (i = 0; i < strlen(chlString) / 4; i += 2) {
+ for (i = 0; i < mir_strlen(chlString) / 4; i += 2) {
LONGLONG temp = chlStringArray[i];
temp = (0x0E79A9C1 * temp) % 0x7FFFFFFF;
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index e512463499..08565ce654 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -182,7 +182,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP char* p = strchr(szFile + 1, '\"');
if (p != NULL) {
*p = '\0';
- memmove(szFile, szFile + 1, strlen(szFile));
+ memmove(szFile, szFile + 1, mir_strlen(szFile));
tSelectLen += 2;
goto LBL_Continue;
}
@@ -191,7 +191,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP char* p = strchr(szFile, ' ');
if (p != NULL) *p = '\0';
LBL_Continue:
- tSelectLen += strlen(szFile);
+ tSelectLen += mir_strlen(szFile);
OPENFILENAMEA ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index 06f90bb63b..fcba3a8e3f 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -1158,8 +1158,8 @@ void CMsnProto::p2p_InitFileTransfer( if (pictmatch) {
UrlDecode(dbv.pszVal);
- ezxml_t xmlcon = ezxml_parse_str((char*)szContext, strlen(szContext));
- ezxml_t xmldb = ezxml_parse_str(dbv.pszVal, strlen(dbv.pszVal));
+ ezxml_t xmlcon = ezxml_parse_str((char*)szContext, mir_strlen(szContext));
+ ezxml_t xmldb = ezxml_parse_str(dbv.pszVal, mir_strlen(dbv.pszVal));
const char *szCtBuf = ezxml_attr(xmlcon, "SHA1C");
if (szCtBuf) {
@@ -2051,7 +2051,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid) return;
}
- ezxml_t xmlo = ezxml_parse_str(NEWSTR_ALLOCA(ft->p2p_object), strlen(ft->p2p_object));
+ ezxml_t xmlo = ezxml_parse_str(NEWSTR_ALLOCA(ft->p2p_object), mir_strlen(ft->p2p_object));
ezxml_t xmlr = ezxml_new("msnobj");
const char* p;
@@ -2080,7 +2080,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid) ezxml_set_attr(xmlr, "SHA1C", p);
pContext = ezxml_toxml(xmlr, false);
- cbContext = strlen(pContext) + 1;
+ cbContext = mir_strlen(pContext) + 1;
ezxml_free(xmlr);
ezxml_free(xmlo);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index a49e3bca54..8e1eebc17f 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -271,9 +271,9 @@ MCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int, MEVENT hDbEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return NULL;
char* nick = (char *)(dbei.pBlob + sizeof(DWORD) * 2);
- char* firstName = nick + strlen(nick) + 1;
- char* lastName = firstName + strlen(firstName) + 1;
- char* email = lastName + strlen(lastName) + 1;
+ char* firstName = nick + mir_strlen(nick) + 1;
+ char* lastName = firstName + mir_strlen(firstName) + 1;
+ char* email = lastName + mir_strlen(lastName) + 1;
return AddToListByEmail(email, nick, flags);
}
@@ -335,9 +335,9 @@ int CMsnProto::Authorize(MEVENT hDbEvent) return 1;
char *nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
- char *firstName = nick + strlen(nick) + 1;
- char *lastName = firstName + strlen(firstName) + 1;
- char *email = lastName + strlen(lastName) + 1;
+ char *firstName = nick + mir_strlen(nick) + 1;
+ char *lastName = firstName + mir_strlen(firstName) + 1;
+ char *email = lastName + mir_strlen(lastName) + 1;
MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, 0);
int netId = Lists_GetNetId(email);
@@ -373,9 +373,9 @@ int CMsnProto::AuthDeny(MEVENT hDbEvent, const TCHAR*) return 1;
char* nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
- char* firstName = nick + strlen(nick) + 1;
- char* lastName = firstName + strlen(firstName) + 1;
- char* email = lastName + strlen(lastName) + 1;
+ char* firstName = nick + mir_strlen(nick) + 1;
+ char* lastName = firstName + mir_strlen(firstName) + 1;
+ char* email = lastName + mir_strlen(lastName) + 1;
MsnContact* msc = Lists_Get(email);
if (msc == NULL) return 0;
@@ -833,7 +833,7 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) switch (netId) {
case NETID_MOB:
- if (strlen(msg) > 133) {
+ if (mir_strlen(msg) > 133) {
errMsg = Translate("Message is too long: SMS page limited to 133 UTF8 chars");
seq = 999997;
}
@@ -845,7 +845,7 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) break;
case NETID_YAHOO:
- if (strlen(msg) > 1202) {
+ if (mir_strlen(msg) > 1202) {
seq = 999996;
errMsg = Translate("Message is too long: MSN messages are limited by 1202 UTF8 chars");
ForkThread(&CMsnProto::MsnFakeAck, new TFakeAckParams(hContact, seq, errMsg, this));
@@ -857,7 +857,7 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) break;
default:
- if (strlen(msg) > 1202) {
+ if (mir_strlen(msg) > 1202) {
seq = 999996;
errMsg = Translate("Message is too long: MSN messages are limited by 1202 UTF8 chars");
ForkThread(&CMsnProto::MsnFakeAck, new TFakeAckParams(hContact, seq, errMsg, this));
@@ -940,7 +940,7 @@ int __cdecl CMsnProto::SetAwayMsg(int status, const TCHAR* msg) mir_free(*msgptr);
char* buf = *msgptr = mir_utf8encodeT(msg);
- if (buf && strlen(buf) > 1859) {
+ if (buf && mir_strlen(buf) > 1859) {
buf[1859] = 0;
const int i = 1858;
if (buf[i] & 128) {
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index 073d8ac3aa..ec01f9a0ee 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -64,7 +64,7 @@ ezxml_t CMsnProto::abSoapHdr(const char* service, const char* scenario, ezxml_t& ezxml_set_txt(node, "00000000-0000-0000-0000-000000000000");
}
- size_t hdrsz = strlen(service) + sizeof(abReqHdr) + 20;
+ size_t hdrsz = mir_strlen(service) + sizeof(abReqHdr) + 20;
httphdr = (char*)mir_alloc(hdrsz);
mir_snprintf(httphdr, hdrsz, abReqHdr, service);
@@ -161,7 +161,7 @@ bool CMsnProto::MSN_ABAdd(bool allowRecurse) if (tResult != NULL) {
UpdateABHost("ABAdd", abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
@@ -239,7 +239,7 @@ bool CMsnProto::MSN_SharingFindMembership(bool deltas, bool allowRecurse) free(szData);
if (tResult != NULL) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
if (status == 200) {
UpdateABCacheKey(xmlm, true);
ezxml_t body = getSoapResponse(xmlm, "FindMembership");
@@ -425,7 +425,7 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c if (tResult != NULL) {
UpdateABHost(szMethod, abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, true);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
@@ -503,7 +503,7 @@ bool CMsnProto::MSN_SharingMyProfile(bool allowRecurse) mir_free(reqHdr);
free(szData);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
@@ -617,7 +617,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas free(szData);
if (tResult != NULL) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 200) {
@@ -842,7 +842,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)strlen(szCircleTicket)));
+ ptrA szCircleTicketEnc(mir_base64_encode((PBYTE)szCircleTicket, (unsigned)mir_strlen(szCircleTicket)));
if (szCircleTicketEnc)
msnNsThread->sendPacket("USR", "SHA A %s", szCircleTicketEnc);
}
@@ -898,7 +898,7 @@ bool CMsnProto::MSN_ABRefreshClist(void) if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
if (nlhrReply->resultCode == 200 && nlhrReply->pData) {
- ezxml_t xmlm = ezxml_parse_str(nlhrReply->pData, strlen(nlhrReply->pData));
+ ezxml_t xmlm = ezxml_parse_str(nlhrReply->pData, mir_strlen(nlhrReply->pData));
if (xmlm) {
bRet = true;
@@ -1021,7 +1021,7 @@ bool CMsnProto::MSN_ABAddDelContactGroup(const char* szCntId, const char* szGrpI if (tResult != NULL) {
UpdateABHost(szMethod, abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
@@ -1082,7 +1082,7 @@ void CMsnProto::MSN_ABAddGroup(const char* szGrpName, bool allowRecurse) if (tResult != NULL) {
UpdateABHost("ABGroupAdd", abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 200) {
ezxml_t body = getSoapResponse(xmlm, "ABGroupAdd");
@@ -1139,7 +1139,7 @@ void CMsnProto::MSN_ABRenameGroup(const char* szGrpName, const char* szGrpId, bo if (tResult != NULL) {
UpdateABHost("ABGroupUpdate", abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
@@ -1224,7 +1224,7 @@ bool CMsnProto::MSN_ABAddRemoveContact(const char* szCntId, int netId, bool add, if (tResult != NULL) {
UpdateABHost("ABContactUpdate", abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
@@ -1290,7 +1290,7 @@ bool CMsnProto::MSN_ABUpdateProperty(const char* szCntId, const char* propName, if (tResult != NULL) {
UpdateABHost("ABContactUpdate", abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
@@ -1355,7 +1355,7 @@ void CMsnProto::MSN_ABUpdateAttr(const char* szCntId, const char* szAttr, const if (tResult != NULL) {
UpdateABHost("ABContactUpdate", abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
@@ -1478,7 +1478,7 @@ unsigned CMsnProto::MSN_ABContactAdd(const char* szEmail, const char* szNick, in free(szData);
if (tResult != NULL) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 200) {
ezxml_t body = getSoapResponse(xmlm, "ABContactAdd");
@@ -1617,7 +1617,7 @@ void CMsnProto::MSN_ABUpdateDynamicItem(bool allowRecurse) if (tResult != NULL) {
UpdateABHost("UpdateDynamicItem", abUrl);
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp index 27393513a6..9bbe50fb89 100644 --- a/protocols/MSN/src/msn_soapstore.cpp +++ b/protocols/MSN/src/msn_soapstore.cpp @@ -60,7 +60,7 @@ ezxml_t CMsnProto::storeSoapHdr(const char* service, const char* scenario, ezxml tbdy = ezxml_add_child(bdy, service, 0);
ezxml_set_attr(tbdy, "xmlns", "http://www.msn.com/webservices/storage/2008");
- size_t hdrsz = strlen(service) + sizeof(storeReqHdr) + 20;
+ size_t hdrsz = mir_strlen(service) + sizeof(storeReqHdr) + 20;
httphdr = (char*)mir_alloc(hdrsz);
mir_snprintf(httphdr, hdrsz, storeReqHdr, service);
@@ -123,7 +123,7 @@ bool CMsnProto::MSN_StoreCreateProfile(bool allowRecurse) if (tResult != NULL) {
if (status == 200) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
UpdateStoreCacheKey(xmlm);
ezxml_t body = getSoapResponse(xmlm, "CreateProfile");
@@ -133,7 +133,7 @@ bool CMsnProto::MSN_StoreCreateProfile(bool allowRecurse) ezxml_free(xmlm);
}
else if (status == 500) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
@@ -174,7 +174,7 @@ bool CMsnProto::MSN_StoreShareItem(const char* id, bool allowRecurse) free(szData);
if (tResult != NULL && status == 500) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
@@ -252,7 +252,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) if (tResult != NULL) {
if (status == 200) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
ezxml_t body = getSoapResponse(xmlm, "GetProfile");
UpdateStoreHost("GetProfile", body ? storeUrl : NULL);
@@ -290,7 +290,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) ezxml_free(xmlm);
}
else if (status == 500 && allowRecurse) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
@@ -361,7 +361,7 @@ bool CMsnProto::MSN_StoreUpdateProfile(const char* szNick, const char* szStatus, MSN_ABUpdateDynamicItem();
}
else if (status == 500 && allowRecurse) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
@@ -419,7 +419,7 @@ bool CMsnProto::MSN_StoreCreateRelationships(bool allowRecurse) UpdateStoreHost("CreateRelationships", storeUrl);
if (status == 500) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
@@ -486,7 +486,7 @@ bool CMsnProto::MSN_StoreDeleteRelationships(bool tile, bool allowRecurse) if (tResult != NULL) {
UpdateStoreHost("DeleteRelationships", storeUrl);
if (status == 500) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
@@ -563,13 +563,13 @@ bool CMsnProto::MSN_StoreCreateDocument(const TCHAR *sztName, const char *szMime if (tResult != NULL) {
UpdateStoreHost("CreateDocument", storeUrl);
if (status == 200) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
ezxml_t bdy = getSoapResponse(xmlm, "CreateDocument");
strncpy_s(photoid, ezxml_txt(bdy), _TRUNCATE);
ezxml_free(xmlm);
}
else if (status == 500) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
@@ -635,7 +635,7 @@ bool CMsnProto::MSN_StoreUpdateDocument(const TCHAR *sztName, const char *szMime if (tResult != NULL) {
UpdateStoreHost("UpdateDocument", storeUrl);
if (status == 500 && allowRecurse) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
@@ -715,7 +715,7 @@ bool CMsnProto::MSN_StoreFindDocuments(bool allowRecurse) if (tResult != NULL) {
UpdateStoreHost("FindDocuments", storeUrl);
if (status == 500) {
- ezxml_t xmlm = ezxml_parse_str(tResult, strlen(tResult));
+ ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
diff --git a/protocols/MSN/src/msn_ssl.cpp b/protocols/MSN/src/msn_ssl.cpp index b4f0402e4b..a2fdb581b3 100644 --- a/protocols/MSN/src/msn_ssl.cpp +++ b/protocols/MSN/src/msn_ssl.cpp @@ -35,7 +35,7 @@ char* CMsnProto::getSslResult(char** parUrl, const char* parAuthInfo, const char nlhr.requestType = REQUEST_POST;
nlhr.flags = NLHRF_HTTP11 | NLHRF_DUMPASTEXT | NLHRF_PERSISTENT | NLHRF_REDIRECT;
nlhr.szUrl = *parUrl;
- nlhr.dataLength = (int)strlen(parAuthInfo);
+ nlhr.dataLength = (int)mir_strlen(parAuthInfo);
nlhr.pData = (char*)parAuthInfo;
nlhr.nlc = hHttpsConnection;
|