diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:33:13 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:33:13 +0000 |
commit | 159b565b390687258ee65a3b66596e118752063c (patch) | |
tree | 91105378fcb9e030ba4a7f6572c4ea307cb8c8d6 /protocols/MSN | |
parent | 7f4d529b59698d7eb2403bd1f9088a5aa7fa9080 (diff) |
replace strcmp to mir_strcmp
git-svn-id: http://svn.miranda-ng.org/main/trunk@13752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 16 | ||||
-rw-r--r-- | protocols/MSN/src/msn_chat.cpp | 20 | ||||
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 78 | ||||
-rw-r--r-- | protocols/MSN/src/msn_contact.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_ftold.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_mail.cpp | 14 | ||||
-rw-r--r-- | protocols/MSN/src/msn_menu.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 6 | ||||
-rw-r--r-- | protocols/MSN/src/msn_natdetect.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_opts.cpp | 12 | ||||
-rw-r--r-- | protocols/MSN/src/msn_p2p.cpp | 46 | ||||
-rw-r--r-- | protocols/MSN/src/msn_p2ps.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 10 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapab.cpp | 108 | ||||
-rw-r--r-- | protocols/MSN/src/msn_soapstore.cpp | 20 | ||||
-rw-r--r-- | protocols/MSN/src/msn_srv.cpp | 12 | ||||
-rw-r--r-- | protocols/MSN/src/msn_svcs.cpp | 10 |
17 files changed, 184 insertions, 184 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index b54ef2c1ba..a0e221132f 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -162,7 +162,7 @@ int CMsnProto::MSN_GetPassportAuth(void) if (db_get_static(NULL, m_szModuleName, "MsnPassportHost", szPassportHost, 256))
strcpy(szPassportHost, defaultPassportUrl);
- bool defaultUrlAllow = strcmp(szPassportHost, defaultPassportUrl) != 0;
+ bool defaultUrlAllow = mir_strcmp(szPassportHost, defaultPassportUrl) != 0;
char *tResult = NULL;
while (retVal == -1) {
@@ -199,7 +199,7 @@ int CMsnProto::MSN_GetPassportAuth(void) const char* addr = ezxml_txt(ezxml_get(tokr, "wsp:AppliesTo", 0,
"wsa:EndpointReference", 0, "wsa:Address", -1));
- if (strcmp(addr, "http://Passport.NET/tb") == 0) {
+ if (mir_strcmp(addr, "http://Passport.NET/tb") == 0) {
ezxml_t node = ezxml_get(tokr, "wst:RequestedSecurityToken", 0, "EncryptedData", -1);
free(hotAuthToken);
hotAuthToken = ezxml_toxml(node, 0);
@@ -209,7 +209,7 @@ int CMsnProto::MSN_GetPassportAuth(void) replaceStr(hotSecretToken, ezxml_txt(node));
setString("hotSecretToken", hotSecretToken);
}
- else if (strcmp(addr, "chatservice.live.com") == 0) {
+ else if (mir_strcmp(addr, "chatservice.live.com") == 0) {
ezxml_t node = ezxml_get(tokr, "wst:RequestedProofToken", 0,
"wst:BinarySecret", -1);
if (toks) {
@@ -221,7 +221,7 @@ int CMsnProto::MSN_GetPassportAuth(void) errurl = ezxml_txt(ezxml_get(tokr, "S:Fault", 0, "psf:pp", 0, "psf:flowurl", -1));
}
}
- else if (strcmp(addr, "messenger.msn.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "messenger.msn.com") == 0 && toks) {
const char* tok = ezxml_txt(toks);
char* ch = (char*)strchr(tok, '&');
*ch = 0;
@@ -229,14 +229,14 @@ int CMsnProto::MSN_GetPassportAuth(void) replaceStr(pAuthToken, ch + 3);
*ch = '&';
}
- else if (strcmp(addr, "contacts.msn.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "contacts.msn.com") == 0 && toks) {
replaceStr(authContactToken, ezxml_txt(toks));
setString("authContactToken", authContactToken);
}
- else if (strcmp(addr, "messengersecure.live.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "messengersecure.live.com") == 0 && toks) {
replaceStr(oimSendToken, ezxml_txt(toks));
}
- else if (strcmp(addr, "storage.msn.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "storage.msn.com") == 0 && toks) {
replaceStr(authStorageToken, ezxml_txt(toks));
setString("authStorageToken", authStorageToken);
}
@@ -258,7 +258,7 @@ int CMsnProto::MSN_GetPassportAuth(void) }
else {
const char* szFault = ezxml_txt(ezxml_get(tokf, "psf:error", 0, "psf:value", -1));
- retVal = strcmp(szFault, "0x80048821") == 0 ? 3 : (tokf ? 5 : 7);
+ retVal = mir_strcmp(szFault, "0x80048821") == 0 ? 3 : (tokf ? 5 : 7);
if (retVal != 3 && defaultUrlAllow) {
strcpy(szPassportHost, defaultPassportUrl);
defaultUrlAllow = false;
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index afdc41d3a9..0e8926f27d 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -87,7 +87,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli) int j;
- if (!strcmp(xmli->txt, "thread")) return;
+ if (!mir_strcmp(xmli->txt, "thread")) return;
// If Chat ID already exists, don'T create a new one
const char *pszID = ezxml_txt(ezxml_child(xmli, "id"));
@@ -115,7 +115,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli) GCUserItem *gcu = NULL;
for (j = 0; j < info->mJoinedContacts.getCount(); j++) {
- if (!strcmp(info->mJoinedContacts[j]->WLID, mri)) {
+ if (!mir_strcmp(info->mJoinedContacts[j]->WLID, mri)) {
gcu = info->mJoinedContacts[j];
break;
}
@@ -127,7 +127,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli) }
_tcscpy(gcu->role, _A2T(role));
- if (pszCreator && !strcmp(mri, pszCreator)) info->mCreator = gcu;
+ if (pszCreator && !mir_strcmp(mri, pszCreator)) info->mCreator = gcu;
char* szEmail, *szNet;
parseWLID(NEWSTR_ALLOCA(mri), &szNet, &szEmail, NULL);
if (!stricmp(szEmail, GetMyUsername(atoi(szNet))))
@@ -174,7 +174,7 @@ const TCHAR *CMsnProto::MSN_GCGetRole(GCThreadData* thread, const char *pszWLID) {
if (thread) {
for (int j = 0; j < thread->mJoinedContacts.getCount(); j++) {
- if (!strcmp(thread->mJoinedContacts[j]->WLID, pszWLID)) {
+ if (!mir_strcmp(thread->mJoinedContacts[j]->WLID, pszWLID)) {
return thread->mJoinedContacts[j]->role;
}
}
@@ -184,7 +184,7 @@ const TCHAR *CMsnProto::MSN_GCGetRole(GCThreadData* thread, const char *pszWLID) void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID)
{
- if (!strcmp(xmli->name, "topicupdate")) {
+ if (!mir_strcmp(xmli->name, "topicupdate")) {
ezxml_t initiator = ezxml_child(xmli, "initiator");
GCDEST gcd = { m_szModuleName, mChatID, GC_EVENT_TOPIC};
GCEVENT gce = { sizeof(gce), &gcd };
@@ -204,20 +204,20 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID) GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
- if (!strcmp(xmli->name, "deletemember")) {
+ if (!mir_strcmp(xmli->name, "deletemember")) {
gcd.iType = GC_EVENT_PART;
if (ezxml_t initiator = ezxml_child(xmli, "initiator")) {
- if (strcmp(initiator->txt, target->txt)) {
+ if (mir_strcmp(initiator->txt, target->txt)) {
hContInitiator = MSN_HContactFromEmail(initiator->txt);
gce.ptszStatus = GetContactNameT(hContInitiator);
gcd.iType = GC_EVENT_KICK;
}
}
}
- else if (!strcmp(xmli->name, "addmember")) {
+ else if (!mir_strcmp(xmli->name, "addmember")) {
gcd.iType = GC_EVENT_JOIN;
}
- else if (!strcmp(xmli->name, "roleupdate")) {
+ else if (!mir_strcmp(xmli->name, "roleupdate")) {
gcd.iType = GC_EVENT_ADDSTATUS;
if (ezxml_t initiator = ezxml_child(xmli, "initiator")) {
hContInitiator = MSN_HContactFromEmail(initiator->txt);
@@ -242,7 +242,7 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID) break;
case GC_EVENT_ADDSTATUS:
case GC_EVENT_REMOVESTATUS:
- gcd.iType = strcmp(ezxml_txt(ezxml_child(target, "role")), "admin")==0?GC_EVENT_ADDSTATUS:GC_EVENT_REMOVESTATUS;
+ gcd.iType = mir_strcmp(ezxml_txt(ezxml_child(target, "role")), "admin")==0?GC_EVENT_ADDSTATUS:GC_EVENT_REMOVESTATUS;
pszTarget = ezxml_txt(ezxml_child(target, "id"));
break;
}
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index e4fc9428e1..33903878c2 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -154,7 +154,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para msgBody = tHeader.readFromBuffer(msgBody);
msgBody = tHeader.readFromBuffer(msgBody);
nick = NEWSTR_ALLOCA(tHeader["IM-Display-Name"]);
- if (!strcmp(tHeader["Message-Type"], "RichText")) {
+ if (!mir_strcmp(tHeader["Message-Type"], "RichText")) {
msgBody = NEWSTR_ALLOCA(msgBody);
stripHTML(msgBody);
HtmlDecode(msgBody);
@@ -216,7 +216,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para if (!_stricmp(tHeader["Message-Type"], "RichText/Contacts")) {
ezxml_t xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody));
if (xmli) {
- if (!strcmp(xmli->name, "contacts")) {
+ if (!mir_strcmp(xmli->name, "contacts")) {
ezxml_t c;
int cnt;
PROTOSEARCHRESULT **isr;
@@ -357,7 +357,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para tContact = gci.hContact;
}
else tContact = MSN_HContactFromEmail(email, nick, true, true);
- if (!strcmp(tHeader["Message-Type"], "Nudge"))
+ if (!mir_strcmp(tHeader["Message-Type"], "Nudge"))
NotifyEventHooks(hMSNNudge, (WPARAM)tContact, 0);
#ifdef OBSOLETE
@@ -536,7 +536,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u }
char *pszUrl, *pszAvatarHash;
- if (cmdstring && *cmdstring && strcmp(cmdstring, "0") &&
+ if (cmdstring && *cmdstring && mir_strcmp(cmdstring, "0") &&
(pszAvatarHash = MSN_GetAvatarHash(cmdstring, &pszUrl)))
{
setString(hContact, "PictContext", cmdstring);
@@ -554,7 +554,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u else {
char szSavedContext[64];
int result = db_get_static(hContact, m_szModuleName, "PictSavedContext", szSavedContext, sizeof(szSavedContext));
- if (result || strcmp(szSavedContext, cmdstring))
+ if (result || mir_strcmp(szSavedContext, cmdstring))
pushAvatarRequest(hContact, pszUrl);
}
}
@@ -588,11 +588,11 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid) for (ezxml_t s = ezxml_child(xmli, "s"); s; s = s->next) {
const char *n = ezxml_attr(s, "n");
- if (!strcmp(n, "SKP")) {
+ if (!mir_strcmp(n, "SKP")) {
szStatMsg = ezxml_txt(ezxml_child(s, "Mood"));
if (*szStatMsg) db_set_utf(hContact, "CList", "StatusMsg", szStatMsg);
else if (!bHasPSM) db_unset(hContact, "CList", "StatusMsg");
- } else if (!strcmp(n, "PE")) {
+ } else if (!mir_strcmp(n, "PE")) {
szStatMsg = ezxml_txt(ezxml_child(s, "PSM"));
if (*szStatMsg) {
stripBBCode((char*)szStatMsg);
@@ -607,7 +607,7 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid) // Add endpoints
for (ezxml_t endp = ezxml_child(xmli, "sep"); endp; endp = ezxml_next(endp)) {
const char *n = ezxml_attr(endp, "n");
- if (!strcmp(n, "IM")) {
+ if (!mir_strcmp(n, "IM")) {
const char *id = ezxml_attr(endp, "epid");
const char *caps = ezxml_txt(ezxml_child(endp, "Capabilities"));
char* end = NULL;
@@ -736,7 +736,7 @@ void CMsnProto::MSN_ProcessNotificationMessage(char* buf, size_t len) if (buf == NULL) return;
ezxml_t xmlnot = ezxml_parse_str(buf, len);
- if (strcmp(ezxml_attr(xmlnot, "siteid"), "0") == 0) {
+ if (mir_strcmp(ezxml_attr(xmlnot, "siteid"), "0") == 0) {
ezxml_free(xmlnot);
return;
}
@@ -858,7 +858,7 @@ LBL_InvalidCommand: char* msgBody = tHeader.readFromBuffer((char*)buf.surelyRead(atol(data.strMsgBytes)));
replaceStr(msnRegistration,tHeader["Set-Registration"]);
- if (!strcmp(data.typeId, "CON")) {
+ if (!mir_strcmp(data.typeId, "CON")) {
ezxml_t xmlbnd = ezxml_parse_str(msgBody, mir_strlen(msgBody));
ezxml_t xmlbdy = ezxml_child(xmlbnd, "nonce");
if (xmlbdy)
@@ -886,7 +886,7 @@ LBL_InvalidCommand: HReadBuffer buf(info, 0);
char* msgBody = (char*)buf.surelyRead(atol(data.strMsgBytes));
- if (strcmp(data.typeId, "CON")) break;
+ if (mir_strcmp(data.typeId, "CON")) break;
if (MyOptions.netId!=NETID_SKYPE) {
/* MSN account login */
@@ -960,7 +960,7 @@ LBL_InvalidCommand: if (tHeader["Set-Registration"]) replaceStr(msnRegistration,tHeader["Set-Registration"]);
if (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))
{
- if (!strcmp(xmli->name, "recentconversations-response"))
+ if (!mir_strcmp(xmli->name, "recentconversations-response"))
{
for (ezxml_t conv = ezxml_get(xmli, "conversations", 0, "conversation", -1); conv != NULL; conv = ezxml_next(conv)) {
ezxml_t id;
@@ -993,7 +993,7 @@ LBL_InvalidCommand: }
}
}
- else if (!strcmp(xmli->name, "messagesbyconversation-response")) {
+ else if (!mir_strcmp(xmli->name, "messagesbyconversation-response")) {
ezxml_t id;
MCONTACT hContact;
@@ -1022,7 +1022,7 @@ LBL_InvalidCommand: message=content->txt;
sentMsg = stricmp(email, GetMyUsername(atoi(netId)))==0;
if (msgtype) {
- if (!strcmp(msgtype->txt, "RichText")) {
+ if (!mir_strcmp(msgtype->txt, "RichText")) {
message = NEWSTR_ALLOCA(message);
stripHTML(message);
HtmlDecode(message);
@@ -1032,7 +1032,7 @@ LBL_InvalidCommand: ezxml_free(xmlact);
}
continue;
- } else if (strcmp(msgtype->txt, "Text")) continue;
+ } else if (mir_strcmp(msgtype->txt, "Text")) continue;
/* TODO: Implement i.e. RichText/Files for announcement of file transfers */
}
@@ -1091,7 +1091,7 @@ LBL_InvalidCommand: msgs.destroy();
}
}
- else if (!strcmp(xmli->name, "threads-response")) {
+ else if (!mir_strcmp(xmli->name, "threads-response")) {
for (ezxml_t thread = ezxml_get(xmli, "threads", 0, "thread", -1); thread != NULL; thread = ezxml_next(thread))
MSN_ChatStart(thread);
}
@@ -1114,19 +1114,19 @@ LBL_InvalidCommand: HReadBuffer buf(info, 0);
char* msgBody = (char*)buf.surelyRead(atol(data.strMsgBytes));
if (msgBody == NULL) break;
- if (!strcmp(data.typeId, "MSGR\\HOTMAIL")) {
+ if (!mir_strcmp(data.typeId, "MSGR\\HOTMAIL")) {
char szParam[128];
mir_snprintf(szParam, sizeof(szParam), "%s %s", data.typeId, data.strMsgBytes);
MSN_ReceiveMessage(info, cmdString, szParam);
break;
- } else if (!strcmp(data.typeId, "MSGR\\ABCH")) {
+ } else if (!mir_strcmp(data.typeId, "MSGR\\ABCH")) {
MimeHeaders tHeader;
msgBody = tHeader.readFromBuffer(msgBody);
MSN_ProcessNotificationMessage(msgBody, mir_strlen(msgBody));
break;
}
- if (!strcmp(data.typeId, "MSGR\\PUT") || !strcmp(data.typeId, "MSGR\\DEL")) {
+ if (!mir_strcmp(data.typeId, "MSGR\\PUT") || !mir_strcmp(data.typeId, "MSGR\\DEL")) {
MimeHeaders tHeader;
int i;
@@ -1141,12 +1141,12 @@ LBL_InvalidCommand: ezxml_t xmli;
if (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))
{
- if (!strcmp(xmli->name, "user"))
+ if (!mir_strcmp(xmli->name, "user"))
{
ezxml_t xmlstatus = ezxml_get(xmli, "s", 0, "Status", -1);
/* FIXME: MSGR\DEL: Instance of user with given EPID disconnected, not
* sure if this implies that contact is offline now... */
- if (xmlstatus || !strcmp(data.typeId, "MSGR\\DEL"))
+ if (xmlstatus || !mir_strcmp(data.typeId, "MSGR\\DEL"))
{
// These capabilities seem to be something different than in previous MSNP versions?
//ezxml_t xmlcaps = ezxml_get(xmli, "sep", 0, "Capabilities", -1);
@@ -1159,7 +1159,7 @@ LBL_InvalidCommand: }
}
}
- else if (!strcmp(data.typeId, "MSGR\\THREAD")) {
+ else if (!mir_strcmp(data.typeId, "MSGR\\THREAD")) {
MimeHeaders tHeader;
char *msgBody = tHeader.readFromBuffer(info->mData);
ezxml_t xmli;
@@ -1201,7 +1201,7 @@ LBL_InvalidCommand: } else { // PUT
ezxml_t xmli;
if (*msgBody && (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))) {
- if (!strcmp(xmli->name, "presence-response")) {
+ if (!mir_strcmp(xmli->name, "presence-response")) {
ezxml_t user, from;
if ((user = ezxml_child(xmli, "user")) && (from = ezxml_child(xmli, "from"))) {
if (ezxml_t xmlstatus = ezxml_get(user, "s", 0, "Status", -1)) {
@@ -1238,7 +1238,7 @@ LBL_InvalidCommand: MimeHeaders tHeader;
HReadBuffer buf(info, 0);
char* msgBody = tHeader.readFromBuffer((char*)buf.surelyRead(atol(data.strMsgBytes)));
- if (!strcmp(data.typeId, "CON")) {
+ if (!mir_strcmp(data.typeId, "CON")) {
ezxml_t xmlxfr = ezxml_parse_str(msgBody, mir_strlen(msgBody));
ezxml_t xmltgt = ezxml_child(xmlxfr, "target");
if (xmltgt)
@@ -1319,14 +1319,14 @@ void CMsnProto::MSN_InviteMessage(ThreadData* info, char* msgBody, char* email, // const char* Connectivity = tFileInfo["Connectivity"];
if (AppGUID != NULL) {
- if (!strcmp(AppGUID, "{02D3C01F-BF30-4825-A83A-DE7AF41648AA}")) {
+ if (!mir_strcmp(AppGUID, "{02D3C01F-BF30-4825-A83A-DE7AF41648AA}")) {
MSN_ShowPopup(info->getContactHandle(),
TranslateT("Contact tried to open an audio conference (not currently supported)"), MSN_ALLOW_MSGBOX);
return;
}
}
- if (Invcommand && (strcmp(Invcommand, "CANCEL") == 0)) {
+ if (Invcommand && (mir_strcmp(Invcommand, "CANCEL") == 0)) {
delete info->mMsnFtp;
info->mMsnFtp = NULL;
}
@@ -1709,7 +1709,7 @@ LBL_InvalidCommand: break;
}
- if (strcmp(tWords[0], "OK") != 0) {
+ if (mir_strcmp(tWords[0], "OK") != 0) {
size_t len = atol(tWords[0]);
MSN_ProcessAdd((char*)HReadBuffer(info, 0).surelyRead(len), len);
}
@@ -1773,7 +1773,7 @@ LBL_InvalidCommand: // see if the session is quit due to idleness
if (info->mChatID[0] && personleft == 1) {
- if (!strcmp(data.isIdle, "1")) {
+ if (!mir_strcmp(data.isIdle, "1")) {
GCDEST gcd = { m_szModuleName, info->mChatID, GC_EVENT_INFORMATION };
GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
@@ -1899,7 +1899,7 @@ LBL_InvalidCommand: UrlDecode(data.userNick);
MCONTACT hContact = MSN_HContactFromEmail(data.userEmail, data.userNick, true, true);
- if (tNumTokens == 5 && strcmp(data.flags, "0:0")) {
+ if (tNumTokens == 5 && mir_strcmp(data.flags, "0:0")) {
MsnContact *cont = Lists_Get(data.userEmail);
if (cont) {
char* end = NULL;
@@ -1913,7 +1913,7 @@ LBL_InvalidCommand: setWord(hContact, "Status", ID_STATUS_INVISIBLE);
// only start the chat session after all the IRO messages has been recieved
- if (info->mJoinedContactsWLID.getCount() > 1 && !strcmp(data.strThisContact, data.totalContacts))
+ if (info->mJoinedContactsWLID.getCount() > 1 && !mir_strcmp(data.strThisContact, data.totalContacts))
MSN_ChatStart(info);
}
}
@@ -1963,7 +1963,7 @@ LBL_InvalidCommand: return 1;
}
- if (strcmp(wlid, "chat") == 0) {
+ if (mir_strcmp(wlid, "chat") == 0) {
MsgQueueEntry E;
MsgQueue_GetNext(wlid, E);
@@ -2080,7 +2080,7 @@ LBL_InvalidCommand: if (sttDivideWords(params, 1, tWords) != 1)
goto LBL_InvalidCommand;
- if (strcmp(tWords[0], "OK") != 0) {
+ if (mir_strcmp(tWords[0], "OK") != 0) {
size_t len = atol(tWords[0]);
MSN_ProcessRemove((char*)HReadBuffer(info, 0).surelyRead(len), len);
}
@@ -2104,7 +2104,7 @@ LBL_InvalidCommand: stripBBCode(data.callerNick);
stripColorCode(data.callerNick);
- if (strcmp(data.security, "CKI")) {
+ if (mir_strcmp(data.security, "CKI")) {
debugLogA("Unknown security package in RNG command: %s", data.security);
break;
}
@@ -2212,7 +2212,7 @@ LBL_InvalidCommand: UrlDecode(data.userHandle); UrlDecode(data.friendlyName);
- if (strcmp(data.status, "OK")) {
+ if (mir_strcmp(data.status, "OK")) {
debugLogA("Unknown status to USR command (SB): '%s'", data.status);
break;
}
@@ -2228,7 +2228,7 @@ LBL_InvalidCommand: if (sttDivideWords(params, 4, tWords) != 4)
goto LBL_InvalidCommand;
- if (!strcmp(data.security, "SSO")) {
+ if (!mir_strcmp(data.security, "SSO")) {
if (MSN_GetPassportAuth()) {
m_iDesiredStatus = ID_STATUS_OFFLINE;
return 1;
@@ -2241,7 +2241,7 @@ LBL_InvalidCommand: ForkThread(&CMsnProto::msn_keepAliveThread, NULL);
ForkThread(&CMsnProto::MSNConnDetectThread, NULL);
}
- else if (!strcmp(data.security, "OK")) {
+ else if (!mir_strcmp(data.security, "OK")) {
}
else {
debugLogA("Unknown security package '%s'", data.security);
@@ -2309,7 +2309,7 @@ LBL_InvalidCommand: if (numWords < 3)
goto LBL_InvalidCommand;
- if (!strcmp(data.type, "NS")) { //notification server
+ if (!mir_strcmp(data.type, "NS")) { //notification server
UrlDecode(data.newServer);
ThreadData* newThread = new ThreadData;
strcpy(newThread->mServer, data.newServer);
@@ -2324,13 +2324,13 @@ LBL_InvalidCommand: return 1; //kill the old thread
}
- if (!strcmp(data.type, "SB")) { //switchboard server
+ if (!mir_strcmp(data.type, "SB")) { //switchboard server
UrlDecode(data.newServer);
if (numWords < 4)
goto LBL_InvalidCommand;
- if (strcmp(data.security, "CKI")) {
+ if (mir_strcmp(data.security, "CKI")) {
debugLogA("Unknown XFR SB security package '%s'", data.security);
break;
}
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp index 6087c99a8b..ea27761a17 100644 --- a/protocols/MSN/src/msn_contact.cpp +++ b/protocols/MSN/src/msn_contact.cpp @@ -61,7 +61,7 @@ MCONTACT CMsnProto::MSN_HContactFromChatID(const char* wlid) if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
if (getString(hContact, "ChatRoomID", &dbv) == 0) {
- if (strcmp(dbv.pszVal, wlid) == 0) {
+ if (mir_strcmp(dbv.pszVal, wlid) == 0) {
db_free(&dbv);
return hContact;
}
@@ -172,7 +172,7 @@ bool CMsnProto::MSN_AddUser(MCONTACT hContact, const char* email, int netId, int }
else {
DBVARIANT dbv = { 0 };
- if (!strcmp(email, MyOptions.szEmail))
+ if (!mir_strcmp(email, MyOptions.szEmail))
getStringUtf("Nick", &dbv);
unsigned res1 = MSN_ABContactAdd(email, dbv.pszVal, netId, msg, false);
diff --git a/protocols/MSN/src/msn_ftold.cpp b/protocols/MSN/src/msn_ftold.cpp index f30b06bb66..df6a63679e 100644 --- a/protocols/MSN/src/msn_ftold.cpp +++ b/protocols/MSN/src/msn_ftold.cpp @@ -164,10 +164,10 @@ LBL_InvalidCommand: break;
}
- if (strcmp(protocol1, "MSNFTP") != 0) {
+ if (mir_strcmp(protocol1, "MSNFTP") != 0) {
int tempInt;
int tFieldCount = sscanf(params, "%d %6s", &tempInt, protocol1);
- if (tFieldCount != 2 || strcmp(protocol1, "MSNFTP") != 0) {
+ if (tFieldCount != 2 || mir_strcmp(protocol1, "MSNFTP") != 0) {
debugLogA("Another side requested the unknown protocol (%s), closing thread", params);
return 1;
}
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 984e8fe8b2..eb4242b1d7 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -182,7 +182,7 @@ void CMsnProto::getMetaData(void) void CMsnProto::processMailData(char* mailData)
{
- if (strcmp(mailData, "too-large") == 0) {
+ if (mir_strcmp(mailData, "too-large") == 0) {
getMetaData();
}
else {
@@ -232,13 +232,13 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) if (MsgDelta != NULL) {
int iDelta = atol(MsgDelta);
- if (SrcFolder && strcmp(SrcFolder, "ACTIVE") == 0)
+ if (SrcFolder && mir_strcmp(SrcFolder, "ACTIVE") == 0)
mUnreadMessages -= iDelta;
- else if (DestFolder && strcmp(DestFolder, "ACTIVE") == 0)
+ else if (DestFolder && mir_strcmp(DestFolder, "ACTIVE") == 0)
mUnreadMessages += iDelta;
- if (SrcFolder && strcmp(SrcFolder, "HM_BuLkMail_") == 0)
+ if (SrcFolder && mir_strcmp(SrcFolder, "HM_BuLkMail_") == 0)
mUnreadJunkEmails -= iDelta;
- else if (DestFolder && strcmp(DestFolder, "HM_BuLkMail_") == 0)
+ else if (DestFolder && mir_strcmp(DestFolder, "HM_BuLkMail_") == 0)
mUnreadJunkEmails += iDelta;
if (mUnreadJunkEmails < 0) mUnreadJunkEmails = 0;
@@ -247,8 +247,8 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) if (From != NULL && Subject != NULL && Fromaddr != NULL) {
if (DestFolder != NULL && SrcFolder == NULL) {
- mUnreadMessages += strcmp(DestFolder, "ACTIVE") == 0;
- mUnreadJunkEmails += strcmp(DestFolder, "HM_BuLkMail_") == 0;
+ mUnreadMessages += mir_strcmp(DestFolder, "ACTIVE") == 0;
+ mUnreadJunkEmails += mir_strcmp(DestFolder, "HM_BuLkMail_") == 0;
}
wchar_t* mimeFromW = tFileInfo.decode(From);
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index c596f06b87..82cbbc7a8e 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -364,7 +364,7 @@ static CMsnProto* GetProtoInstanceByHContact(MCONTACT hContact) return NULL;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(szProto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(szProto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return NULL;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index b6e3f3456e..8776bfd310 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -304,7 +304,7 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen) char szAvatarHashdOld[41] = "";
db_get_static(NULL, m_szModuleName, "AvatarHash", szAvatarHashdOld, sizeof(szAvatarHashdOld));
char *szAvatarHash = arrayToHex(sha1d, sizeof(sha1d));
- if (strcmp(szAvatarHashdOld, szAvatarHash)) {
+ if (mir_strcmp(szAvatarHashdOld, szAvatarHash)) {
setString("PictObject", szEncodedBuffer);
setString("AvatarHash", szAvatarHash);
}
@@ -690,7 +690,7 @@ void CMsnProto::MSN_SendStatusMessage(const char* msg) }
mir_free(msgEnc);
- if (msnPreviousUUX == NULL || strcmp(msnPreviousUUX, szMsg)) {
+ if (msnPreviousUUX == NULL || mir_strcmp(msnPreviousUUX, szMsg)) {
replaceStr(msnPreviousUUX, szMsg);
msnNsThread->sendPacket("UUX", "%d\r\n%s", sz, szMsg);
mStatusMsgTS = clock();
@@ -1336,7 +1336,7 @@ char* TWinErrorCode::getText() bool CMsnProto::MSN_IsMyContact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
- return szProto != NULL && strcmp(m_szModuleName, szProto) == 0;
+ return szProto != NULL && mir_strcmp(m_szModuleName, szProto) == 0;
}
bool CMsnProto::MSN_IsMeByContact(MCONTACT hContact, char* szEmail)
diff --git a/protocols/MSN/src/msn_natdetect.cpp b/protocols/MSN/src/msn_natdetect.cpp index 00709b25bd..3920feeaf9 100644 --- a/protocols/MSN/src/msn_natdetect.cpp +++ b/protocols/MSN/src/msn_natdetect.cpp @@ -371,7 +371,7 @@ void CMsnProto::MSNConnDetectThread(void*) // if it does, move to connection type autodetection,
// if it does not, guess connection type from available info
db_get_static(NULL, m_szModuleName, "YourHost", parBuf, sizeof(parBuf));
- if (msnExternalIP == NULL || strcmp(msnExternalIP, parBuf) != 0) {
+ if (msnExternalIP == NULL || mir_strcmp(msnExternalIP, parBuf) != 0) {
MyConnection.extIP = inet_addr(parBuf);
if (MyConnection.extIP == INADDR_NONE) {
PHOSTENT myhost = gethostbyname(parBuf);
@@ -449,7 +449,7 @@ void CMsnProto::MSNConnDetectThread(void*) void MyConnectionType::SetUdpCon(const char* str)
{
for (unsigned i = 0; i < sizeof(conStr) / sizeof(char*); ++i) {
- if (strcmp(conStr[i], str) == 0) {
+ if (mir_strcmp(conStr[i], str) == 0) {
udpConType = (ConEnum)i;
break;
}
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index 08565ce654..b073dadd40 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -226,7 +226,7 @@ LBL_Continue: CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, SIZEOF(szEmail));
- if (strcmp(_strlwr(szEmail), proto->MyOptions.szEmail)) {
+ if (mir_strcmp(_strlwr(szEmail), proto->MyOptions.szEmail)) {
reconnectRequired = true;
strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
@@ -236,7 +236,7 @@ LBL_Continue: GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, SIZEOF(password));
if (!proto->getString("Password", &dbv)) {
- if (strcmp(password, dbv.pszVal)) {
+ if (mir_strcmp(password, dbv.pszVal)) {
reconnectRequired = true;
proto->setString("Password", password);
}
@@ -382,13 +382,13 @@ static INT_PTR CALLBACK DlgProcMsnConnOpts(HWND hwndDlg, UINT msg, WPARAM wParam CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_DIRECTSERVER, str, SIZEOF(str));
- if (strcmp(str, MSN_DEFAULT_LOGIN_SERVER))
+ if (mir_strcmp(str, MSN_DEFAULT_LOGIN_SERVER))
proto->setString("DirectServer", str);
else
proto->delSetting("DirectServer");
GetDlgItemTextA(hwndDlg, IDC_GATEWAYSERVER, str, SIZEOF(str));
- if (strcmp(str, MSN_DEFAULT_GATEWAY))
+ if (mir_strcmp(str, MSN_DEFAULT_GATEWAY))
proto->setString("GatewayServer", str);
else
proto->delSetting("GatewayServer");
@@ -552,7 +552,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, SIZEOF(szEmail));
- if (strcmp(szEmail, proto->MyOptions.szEmail)) {
+ if (mir_strcmp(szEmail, proto->MyOptions.szEmail)) {
strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
proto->setString("wlid", szEmail);
@@ -561,7 +561,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, SIZEOF(password));
if (!proto->getString("Password", &dbv)) {
- if (strcmp(password, dbv.pszVal))
+ if (mir_strcmp(password, dbv.pszVal))
proto->setString("Password", password);
db_free(&dbv);
}
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index fcba3a8e3f..2a515a0e8c 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -120,7 +120,7 @@ bool CMsnProto::p2p_createListener(filetransfer* ft, directconnection *dc, MimeH }
else {
if (i4++ != 0) strcat(szIpv4, " ");
- ipInt |= (strcmp(ihaddr->szIp[i], szExtIp) == 0);
+ ipInt |= (mir_strcmp(ihaddr->szIp[i], szExtIp) == 0);
strcat(szIpv4, ihaddr->szIp[i]);
}
}
@@ -731,7 +731,7 @@ bool CMsnProto::p2p_connectTo(ThreadData* info, directconnection *dc) if (dc->useHashedNonce) {
char* hnonce = dc->calcHashedNonce((UUID*)&cookie.mAckSessionID);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
}
else
@@ -739,7 +739,7 @@ bool CMsnProto::p2p_connectTo(ThreadData* info, directconnection *dc) }
else {
char* hnonce = dc->calcHashedNonce((UUID*)p);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
}
@@ -794,7 +794,7 @@ LBL_Error: if (dc->useHashedNonce) {
char* hnonce = dc->calcHashedNonce((UUID*)&cookie.mAckSessionID);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
memcpy(&cookie.mAckSessionID, dc->mNonce, sizeof(UUID));
}
@@ -812,7 +812,7 @@ LBL_Error: }
else {
char* hnonce = dc->calcHashedNonce((UUID*)p);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
if (!cookieMatch) {
@@ -1164,12 +1164,12 @@ void CMsnProto::p2p_InitFileTransfer( const char *szCtBuf = ezxml_attr(xmlcon, "SHA1C");
if (szCtBuf) {
const char *szPtBuf = ezxml_attr(xmldb, "SHA1C");
- pictmatch = szPtBuf && strcmp(szCtBuf, szPtBuf) == 0;
+ pictmatch = szPtBuf && mir_strcmp(szCtBuf, szPtBuf) == 0;
}
else {
const char *szCtBuf = ezxml_attr(xmlcon, "SHA1D");
const char *szPtBuf = ezxml_attr(xmldb, "SHA1D");
- pictmatch = szCtBuf && szPtBuf && strcmp(szCtBuf, szPtBuf) == 0;
+ pictmatch = szCtBuf && szPtBuf && mir_strcmp(szCtBuf, szPtBuf) == 0;
}
ezxml_free(xmlcon);
@@ -1349,8 +1349,8 @@ void CMsnProto::p2p_InitDirectTransfer(MimeHeaders& tFileInfo, MimeHeaders& tFil conType.extIP = atol(szNetID);
conType.SetUdpCon(szConnType);
- conType.upnpNAT = strcmp(szUPnPNat, "true") == 0;
- conType.icf = strcmp(szICF, "true") == 0;
+ conType.upnpNAT = mir_strcmp(szUPnPNat, "true") == 0;
+ conType.icf = mir_strcmp(szICF, "true") == 0;
conType.CalculateWeight();
MimeHeaders chdrs(12);
@@ -1445,7 +1445,7 @@ void CMsnProto::p2p_InitDirectTransfer2(MimeHeaders& tFileInfo, MimeHeaders& tFi dc->useHashedNonce = szHashedNonce != NULL;
replaceStr(dc->xNonce, szHashedNonce ? szHashedNonce : szNonce);
- if (!strcmp(szListening, "true") && strcmp(dc->xNonce, sttVoidUid)) {
+ if (!mir_strcmp(szListening, "true") && mir_strcmp(dc->xNonce, sttVoidUid)) {
p2p_startConnect(wlid, szCallID, szV6Address, szV6Port, true);
p2p_startConnect(wlid, szCallID, szInternalAddress, szInternalPort, false);
p2p_startConnect(wlid, szCallID, szExternalAddress, szExternalPort, false);
@@ -1495,7 +1495,7 @@ LBL_Close: MimeHeaders chdrs(12);
- if (!strcmp(szOldContentType, "application/x-msnmsgr-sessionreqbody")) {
+ if (!mir_strcmp(szOldContentType, "application/x-msnmsgr-sessionreqbody")) {
if (ft == &ftl) {
p2p_sendCancel(ft);
return;
@@ -1537,7 +1537,7 @@ LBL_Close: chdrs.addString("IPv6-global", GetGlobalIp(), 2);
chdrs.addString("Hashed-Nonce", dc->mNonceToHash(), 2);
}
- else if (!strcmp(szOldContentType, "application/x-msnmsgr-transrespbody")) {
+ else if (!mir_strcmp(szOldContentType, "application/x-msnmsgr-transrespbody")) {
const char *szListening = tFileInfo2["Listening"],
*szNonce = tFileInfo2["Nonce"],
*szHashedNonce = tFileInfo2["Hashed-Nonce"],
@@ -1565,7 +1565,7 @@ LBL_Close: replaceStr(dc->xNonce, szHashedNonce ? szHashedNonce : szNonce);
// another side reported that it will be a server.
- if (!strcmp(szListening, "true") && (szNonce == NULL || strcmp(szNonce, sttVoidUid))) {
+ if (!mir_strcmp(szListening, "true") && (szNonce == NULL || mir_strcmp(szNonce, sttVoidUid))) {
p2p_startConnect(ft->p2p_dest, szCallID, szV6Address, szV6Port, true);
p2p_startConnect(ft->p2p_dest, szCallID, szInternalAddress, szInternalPort, false);
p2p_startConnect(ft->p2p_dest, szCallID, szExternalAddress, szExternalPort, false);
@@ -1584,7 +1584,7 @@ LBL_Close: tResult.addString("Content-Type", "application/x-msnmsgr-transrespbody");
}
- else if (!strcmp(szOldContentType, "application/x-msnmsgr-transreqbody")) {
+ else if (!mir_strcmp(szOldContentType, "application/x-msnmsgr-transreqbody")) {
const char *szHashedNonce = tFileInfo2["Hashed-Nonce"];
const char *szNonce = tFileInfo2["Nonce"];
@@ -1650,17 +1650,17 @@ void CMsnProto::p2p_processSIP(ThreadData* info, char* msgbody, P2PB_Header* hdr }
if (hdrdata && !hdrdata->isV2Hdr()) {
- if (iMsgType == 2 || (iMsgType == 1 && !strcmp(szContentType, "application/x-msnmsgr-transreqbody")))
+ if (iMsgType == 2 || (iMsgType == 1 && !mir_strcmp(szContentType, "application/x-msnmsgr-transreqbody")))
p2p_getMsgId(wlid, 1);
}
switch (iMsgType) {
case 1:
- if (!strcmp(szContentType, "application/x-msnmsgr-sessionreqbody"))
+ if (!mir_strcmp(szContentType, "application/x-msnmsgr-sessionreqbody"))
p2p_InitFileTransfer(info, tFileInfo, tFileInfo2, wlid);
- else if (!strcmp(szContentType, "application/x-msnmsgr-transreqbody"))
+ else if (!mir_strcmp(szContentType, "application/x-msnmsgr-transreqbody"))
p2p_InitDirectTransfer(tFileInfo, tFileInfo2, wlid);
- else if (!strcmp(szContentType, "application/x-msnmsgr-transrespbody"))
+ else if (!mir_strcmp(szContentType, "application/x-msnmsgr-transrespbody"))
p2p_InitDirectTransfer2(tFileInfo, tFileInfo2, wlid);
break;
@@ -1669,7 +1669,7 @@ void CMsnProto::p2p_processSIP(ThreadData* info, char* msgbody, P2PB_Header* hdr break;
case 3:
- if (!strcmp(szContentType, "application/x-msnmsgr-sessionclosebody")) {
+ if (!mir_strcmp(szContentType, "application/x-msnmsgr-sessionclosebody")) {
filetransfer* ft = p2p_getSessionByCallID(tFileInfo["Call-ID"], wlid);
if (ft != NULL) {
if (ft->std.currentFileProgress < ft->std.currentFileSize) {
@@ -1710,12 +1710,12 @@ void CMsnProto::p2p_processSIP(ThreadData* info, char* msgbody, P2PB_Header* hdr break;
case 5:
- if (!strcmp(szContentType, "application/x-msnmsgr-turnsetup")) {
+ if (!mir_strcmp(szContentType, "application/x-msnmsgr-turnsetup")) {
// tFileInfo2["ServerAddress"];
// tFileInfo2["SessionUsername"];
// tFileInfo2["SessionPassword"];
}
- else if (!strcmp(szContentType, "application/x-msnmsgr-transudpswitch")) {
+ else if (!mir_strcmp(szContentType, "application/x-msnmsgr-transudpswitch")) {
// tFileInfo2["IPv6AddrsAndPorts"];
// tFileInfo2["IPv4ExternalAddrsAndPorts"];
// tFileInfo2["IPv4InternalAddrsAndPorts"];
@@ -2099,7 +2099,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid) if (cont->places.getCount() && cont->places[0].cap1 & cap_SupportsP2PBootstrap) {
char wlid[128];
mir_snprintf(wlid, SIZEOF(wlid),
- strcmp(cont->places[0].id, sttVoidUid) ? "%s;%s" : "%s",
+ mir_strcmp(cont->places[0].id, sttVoidUid) ? "%s;%s" : "%s",
cont->email, cont->places[0].id);
if (!MSN_GetThreadByContact(wlid, SERVER_P2P_DIRECT))
@@ -2150,7 +2150,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid) for (int i = 0; i < cont->places.getCount(); ++i) {
char wlid[128];
mir_snprintf(wlid, SIZEOF(wlid),
- strcmp(cont->places[i].id, sttVoidUid) ? "%s;%s" : "%s",
+ mir_strcmp(cont->places[i].id, sttVoidUid) ? "%s;%s" : "%s",
cont->email, cont->places[i].id);
p2p_sendSlp(-2, ft, tResult, chdrs, wlid);
diff --git a/protocols/MSN/src/msn_p2ps.cpp b/protocols/MSN/src/msn_p2ps.cpp index 4b0ded416d..7d288f9e2f 100644 --- a/protocols/MSN/src/msn_p2ps.cpp +++ b/protocols/MSN/src/msn_p2ps.cpp @@ -256,7 +256,7 @@ directconnection* CMsnProto::p2p_getDCByCallID(const char* CallID, const char* w for (int i = 0; i < m_arDirect.getCount(); i++) {
directconnection* DC = &m_arDirect[i];
- if (DC->callId != NULL && !strcmp(DC->callId, CallID) && !strcmp(DC->wlid, wlid))
+ if (DC->callId != NULL && !mir_strcmp(DC->callId, CallID) && !mir_strcmp(DC->wlid, wlid))
return DC;
}
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index c8e01b99c3..5a2036a115 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -98,8 +98,8 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : char path[MAX_PATH];
if (db_get_static(NULL, m_szModuleName, "LoginServer", path, sizeof(path)) == 0 &&
- (strcmp(path, MSN_DEFAULT_LOGIN_SERVER) == 0 ||
- strcmp(path, MSN_DEFAULT_GATEWAY) == 0))
+ (mir_strcmp(path, MSN_DEFAULT_LOGIN_SERVER) == 0 ||
+ mir_strcmp(path, MSN_DEFAULT_GATEWAY) == 0))
delSetting("LoginServer");
if (MyOptions.SlowSend) {
@@ -267,7 +267,7 @@ MCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int, MEVENT hDbEvent) dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDbEvent, &dbei)) return NULL;
- if (strcmp(dbei.szModule, m_szModuleName)) return NULL;
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) return NULL;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return NULL;
char* nick = (char *)(dbei.pBlob + sizeof(DWORD) * 2);
@@ -331,7 +331,7 @@ int CMsnProto::Authorize(MEVENT hDbEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
char *nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
@@ -369,7 +369,7 @@ int CMsnProto::AuthDeny(MEVENT hDbEvent, const TCHAR*) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
char* nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index ec01f9a0ee..e33a5d3ae8 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -59,7 +59,7 @@ ezxml_t CMsnProto::abSoapHdr(const char* service, const char* scenario, ezxml_t& tbdy = ezxml_add_child(bdy, service, 0);
ezxml_set_attr(tbdy, "xmlns", "http://www.msn.com/webservices/AddressBook");
- if (strstr(service, "Member") == NULL && strcmp(service, "ABAdd") != 0 && strcmp(service, "ABFindContactsPaged")) {
+ if (strstr(service, "Member") == NULL && mir_strcmp(service, "ABAdd") != 0 && mir_strcmp(service, "ABFindContactsPaged")) {
ezxml_t node = ezxml_add_child(tbdy, "abId", 0);
ezxml_set_txt(node, "00000000-0000-0000-0000-000000000000");
}
@@ -106,7 +106,7 @@ void CMsnProto::UpdateABHost(const char* service, const char* url) void CMsnProto::UpdateABCacheKey(ezxml_t bdy, bool isSharing)
{
ezxml_t hdr = ezxml_get(bdy, "soap:Header", 0, "ServiceHeader", -1);
- bool changed = strcmp(ezxml_txt(ezxml_child(hdr, "CacheKeyChanged")), "true") == 0;
+ bool changed = mir_strcmp(ezxml_txt(ezxml_child(hdr, "CacheKeyChanged")), "true") == 0;
if (changed)
replaceStr(isSharing ? sharingCacheKey : abCacheKey, ezxml_txt(ezxml_child(hdr, "CacheKey")));
}
@@ -164,7 +164,7 @@ bool CMsnProto::MSN_ABAdd(bool allowRecurse) 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) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABAdd(false) ? 200 : 500;
}
@@ -260,42 +260,42 @@ bool CMsnProto::MSN_SharingFindMembership(bool deltas, bool allowRecurse) for (ezxml_t mems = ezxml_get(svcs, "Memberships", 0, "Membership", -1); mems != NULL; mems = ezxml_next(mems)) {
const char* szRole = ezxml_txt(ezxml_child(mems, "MemberRole"));
- int lstId = ((strcmp(szRole, "Allow") == 0) ? LIST_AL : ((strcmp(szRole, "Block") == 0) ? LIST_BL :
- ((strcmp(szRole, "Reverse") == 0) ? LIST_RL : ((strcmp(szRole, "Pending") == 0) ? LIST_PL : 0))));
+ int lstId = ((mir_strcmp(szRole, "Allow") == 0) ? LIST_AL : ((mir_strcmp(szRole, "Block") == 0) ? LIST_BL :
+ ((mir_strcmp(szRole, "Reverse") == 0) ? LIST_RL : ((mir_strcmp(szRole, "Pending") == 0) ? LIST_PL : 0))));
for (ezxml_t memb = ezxml_get(mems, "Members", 0, "Member", -1); memb != NULL; memb = ezxml_next(memb)) {
- bool deleted = strcmp(ezxml_txt(ezxml_child(memb, "Deleted")), "true") == 0;
+ bool deleted = mir_strcmp(ezxml_txt(ezxml_child(memb, "Deleted")), "true") == 0;
const char *szType = ezxml_txt(ezxml_child(memb, "Type"));
const char *szInvite = NULL, *szEmail = NULL, *szNick = NULL;
char email[128];
int netId;
- if (strcmp(szType, "Passport") == 0) {
+ if (mir_strcmp(szType, "Passport") == 0) {
netId = NETID_MSN;
szEmail = ezxml_txt(ezxml_child(memb, "PassportName"));
szNick = ezxml_txt(ezxml_child(memb, "DisplayName")); if (!szNick[0]) szNick = NULL;
ezxml_t anot = ezxml_get(memb, "Annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
szInvite = ezxml_txt(ezxml_child(anot, "Value"));
anot = ezxml_next(anot);
}
}
- else if (strcmp(szType, "Phone") == 0) {
+ else if (mir_strcmp(szType, "Phone") == 0) {
netId = NETID_MOB;
mir_snprintf(email, SIZEOF(email), "tel:%s", ezxml_txt(ezxml_child(memb, "PhoneNumber")));
szEmail = email;
}
- else if (strcmp(szType, "Email") == 0) {
+ else if (mir_strcmp(szType, "Email") == 0) {
szEmail = ezxml_txt(ezxml_child(memb, "Email"));
szNick = ezxml_txt(ezxml_child(memb, "DisplayName")); if (!szNick[0]) szNick = NULL;
netId = strstr(szEmail, "@yahoo.com") ? NETID_YAHOO : NETID_LCS;
ezxml_t anot = ezxml_get(memb, "Annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BuddyType") == 0)
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BuddyType") == 0)
netId = atol(ezxml_txt(ezxml_child(anot, "Value")));
- else if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
+ else if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
szInvite = ezxml_txt(ezxml_child(anot, "Value"));
anot = ezxml_next(anot);
@@ -312,11 +312,11 @@ bool CMsnProto::MSN_SharingFindMembership(bool deltas, bool allowRecurse) }
else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "ABDoesNotExist") == 0) {
+ if (mir_strcmp(szErr, "ABDoesNotExist") == 0) {
MSN_ABAdd();
status = 200;
}
- else if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ else if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_SharingFindMembership(deltas, false) ? 200 : 500;
}
@@ -394,7 +394,7 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c ezxml_set_txt(node, szEmail);
char buf[64];
- if ((netId == NETID_LCS || netId == NETID_YAHOO) && strcmp(szMethod, "DeleteMember") != 0) {
+ if ((netId == NETID_LCS || netId == NETID_YAHOO) && mir_strcmp(szMethod, "DeleteMember") != 0) {
node = ezxml_add_child(memb, "Annotations", 0);
ezxml_t anot = ezxml_add_child(node, "Annotation", 0);
node = ezxml_add_child(anot, "Name", 0);
@@ -429,7 +429,7 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c UpdateABCacheKey(xmlm, true);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_SharingAddDelMember(szEmail, listId, netId, szMethod, false) ? 200 : 500;
}
@@ -506,7 +506,7 @@ bool CMsnProto::MSN_SharingMyProfile(bool allowRecurse) 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) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_SharingMyProfile(false);
}
@@ -554,7 +554,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas }
const char *szGroups, *szContacts, *szLastChangeStr;
- if (strcmp(szMethod, "ABFindContactsPaged")) {
+ if (mir_strcmp(szMethod, "ABFindContactsPaged")) {
ezxml_t node = ezxml_add_child(tbdy, "abView", 0);
ezxml_set_txt(node, "Full");
node = ezxml_add_child(tbdy, "deltasOnly", 0);
@@ -625,7 +625,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas UpdateABHost(szMethod, body ? abUrl : NULL);
ezxml_t ab = ezxml_child(body, "Ab");
- if (strcmp(szMethod, "ABFindByContacts")) {
+ if (mir_strcmp(szMethod, "ABFindByContacts")) {
const char* szLastChange = ezxml_txt(ezxml_child(ab, szLastChangeStr));
if (szLastChange[0])
setString("ABFullLastChange", szLastChange);
@@ -655,25 +655,25 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t contInf = ezxml_child(cont, "contactInfo");
const char* szType = ezxml_txt(ezxml_child(contInf, "contactType"));
- if (strcmp(szType, "Me") != 0) {
+ if (mir_strcmp(szType, "Me") != 0) {
char email[128];
const char* szEmail = ezxml_txt(ezxml_child(contInf, "passportName"));
const char* szMsgUsr = ezxml_txt(ezxml_child(contInf, "isMessengerUser"));
int netId = NETID_UNKNOWN;
- if (strcmp(szMsgUsr, "true") == 0) netId = NETID_MSN;
+ if (mir_strcmp(szMsgUsr, "true") == 0) netId = NETID_MSN;
if (szEmail[0] == '\0') {
ezxml_t eml = ezxml_get(contInf, "emails", 0, "ContactEmail", -1);
while (eml != NULL) {
szMsgUsr = ezxml_txt(ezxml_child(eml, "isMessengerEnabled"));
- if (strcmp(szMsgUsr, "true") == 0) {
+ if (mir_strcmp(szMsgUsr, "true") == 0) {
szEmail = ezxml_txt(ezxml_child(eml, "email"));
const char* szCntType = ezxml_txt(ezxml_child(eml, "contactEmailType"));
- if (strcmp(szCntType, "Messenger2") == 0)
+ if (mir_strcmp(szCntType, "Messenger2") == 0)
netId = NETID_YAHOO;
- else if (strcmp(szCntType, "Messenger3") == 0)
+ else if (mir_strcmp(szCntType, "Messenger3") == 0)
netId = NETID_LCS;
break;
}
@@ -684,7 +684,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t phn = ezxml_get(contInf, "phones", 0, "ContactPhone", -1);
while (phn != NULL) {
szMsgUsr = ezxml_txt(ezxml_child(phn, "isMessengerEnabled"));
- if (strcmp(szMsgUsr, "true") == 0) {
+ if (mir_strcmp(szMsgUsr, "true") == 0) {
szEmail = ezxml_txt(ezxml_child(phn, "number"));
mir_snprintf(email, SIZEOF(email), "tel:%s", szEmail);
szEmail = email;
@@ -714,11 +714,11 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas const char* szNick = NULL;
ezxml_t anot = ezxml_get(contInf, "annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.NickName") == 0) {
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.NickName") == 0) {
szNick = ezxml_txt(ezxml_child(anot, "Value"));
db_set_utf(hContact, "CList", "MyHandle", szNick);
}
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.JobTitle") == 0) {
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.JobTitle") == 0) {
const char *szTmp = ezxml_txt(ezxml_child(anot, "Value"));
SetAbParam(hContact, "CompanyPosition", szTmp);
}
@@ -746,10 +746,10 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas SetAbParam(hContact, "CID", szTmp);
szTmp = ezxml_txt(ezxml_child(contInf, "IsNotMobileVisible"));
- setByte(hContact, "MobileAllowed", strcmp(szTmp, "true") != 0);
+ setByte(hContact, "MobileAllowed", mir_strcmp(szTmp, "true") != 0);
szTmp = ezxml_txt(ezxml_child(contInf, "isMobileIMEnabled"));
- setByte(hContact, "MobileEnabled", strcmp(szTmp, "true") == 0);
+ setByte(hContact, "MobileEnabled", mir_strcmp(szTmp, "true") == 0);
szTmp = ezxml_txt(ezxml_child(contInf, "firstName"));
SetAbParam(hContact, "FirstName", szTmp);
@@ -774,9 +774,9 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas const char* szCntType = ezxml_txt(ezxml_child(loc, "contactLocationType"));
int locid = -1;
- if (strcmp(szCntType, "ContactLocationPersonal") == 0)
+ if (mir_strcmp(szCntType, "ContactLocationPersonal") == 0)
locid = 0;
- else if (strcmp(szCntType, "ContactLocationBusiness") == 0)
+ else if (mir_strcmp(szCntType, "ContactLocationBusiness") == 0)
locid = 1;
if (locid >= 0) {
@@ -799,7 +799,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t web = ezxml_get(contInf, "webSites", 0, "ContactWebSite", -1);
while (web != NULL) {
const char* szCntType = ezxml_txt(ezxml_child(web, "contactWebSiteType"));
- if (strcmp(szCntType, "ContactWebSiteBusiness") == 0) {
+ if (mir_strcmp(szCntType, "ContactWebSiteBusiness") == 0) {
szTmp = ezxml_txt(ezxml_child(web, "webURL"));
SetAbParam(hContact, "CompanyHomepage", szTmp);
}
@@ -810,10 +810,10 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas const char *szTmp;
szTmp = ezxml_txt(ezxml_child(contInf, "isMobileIMEnabled"));
- setByte("MobileEnabled", strcmp(szTmp, "true") == 0);
+ setByte("MobileEnabled", mir_strcmp(szTmp, "true") == 0);
szTmp = ezxml_txt(ezxml_child(contInf, "IsNotMobileVisible"));
- setByte("MobileAllowed", strcmp(szTmp, "true") != 0);
+ setByte("MobileAllowed", mir_strcmp(szTmp, "true") != 0);
szTmp = ezxml_txt(ezxml_child(contInf, "firstName"));
setStringUtf(NULL, "FirstName", szTmp);
@@ -823,7 +823,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t anot = ezxml_get(contInf, "annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BLP") == 0)
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BLP") == 0)
msnOtherContactsBlocked = !atol(ezxml_txt(ezxml_child(anot, "Value")));
anot = ezxml_next(anot);
@@ -831,7 +831,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t nil = ezxml_get(contInf, "NetworkInfoList", 0, "NetworkInfo", -1);
while (nil != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(nil, "SourceId")), "SKYPE") == 0) {
+ if (mir_strcmp(ezxml_txt(ezxml_child(nil, "SourceId")), "SKYPE") == 0) {
const char *pszPartner = ezxml_txt(ezxml_child(nil, "DomainTag"));
if (*pszPartner) setString("SkypePartner", pszPartner);
}
@@ -850,11 +850,11 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas }
else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABFind(szMethod, szGuid, deltas, false) ? 200 : 500;
}
- else if (strcmp(szErr, "FullSyncRequired") == 0 && deltas) {
+ else if (mir_strcmp(szErr, "FullSyncRequired") == 0 && deltas) {
status = MSN_ABFind(szMethod, szGuid, false, false) ? 200 : 500;
}
}
@@ -906,18 +906,18 @@ bool CMsnProto::MSN_ABRefreshClist(void) for (ezxml_t pers = ezxml_get(abinf, "persons", 0, "Person", -1); pers != NULL; pers = ezxml_next(pers)) {
const char *cid = ezxml_txt(ezxml_child(pers, "cid"));
- if (mycid && !strcmp(cid, mycid)) continue;
+ if (mycid && !mir_strcmp(cid, mycid)) continue;
for (ezxml_t cont = ezxml_get(pers, "contacts", 0, "Contact", -1); cont != NULL; cont = ezxml_next(cont)) {
int netId;
const char* szEmail;
const char *src = ezxml_txt(ezxml_child(cont, "sourceId"));
- if (!strcmp(src, "WL")) {
+ if (!mir_strcmp(src, "WL")) {
netId = NETID_MSN;
szEmail = ezxml_txt(ezxml_child(cont, "domainTag"));
}
- else if (!strcmp(src, "SKYPE")) {
+ else if (!mir_strcmp(src, "SKYPE")) {
netId = NETID_SKYPE;
szEmail = ezxml_txt(ezxml_child(cont, "objectId"));
}
@@ -1025,7 +1025,7 @@ bool CMsnProto::MSN_ABAddDelContactGroup(const char* szCntId, const char* szGrpI UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABAddDelContactGroup(szCntId, szGrpId, szMethod, false) ? 200 : 500;
}
@@ -1091,7 +1091,7 @@ void CMsnProto::MSN_ABAddGroup(const char* szGrpName, bool allowRecurse) }
else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABAddGroup(szGrpName, false);
}
@@ -1143,7 +1143,7 @@ void CMsnProto::MSN_ABRenameGroup(const char* szGrpName, const char* szGrpId, bo UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABRenameGroup(szGrpName, szGrpId, false);
}
@@ -1228,7 +1228,7 @@ bool CMsnProto::MSN_ABAddRemoveContact(const char* szCntId, int netId, bool add, UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
if (MSN_ABAddRemoveContact(szCntId, netId, add, false))
status = 200;
@@ -1294,7 +1294,7 @@ bool CMsnProto::MSN_ABUpdateProperty(const char* szCntId, const char* propName, UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
if (MSN_ABUpdateProperty(szCntId, propName, propValue, false))
status = 200;
@@ -1359,7 +1359,7 @@ void CMsnProto::MSN_ABUpdateAttr(const char* szCntId, const char* szAttr, const UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABUpdateAttr(szCntId, szAttr, szValue, false);
}
@@ -1497,15 +1497,15 @@ unsigned CMsnProto::MSN_ABContactAdd(const char* szEmail, const char* szNick, in else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "InvalidPassportUser") == 0)
+ if (mir_strcmp(szErr, "InvalidPassportUser") == 0)
status = 1;
- else if (strcmp(szErr, "FederatedQueryFailure") == 0)
+ else if (mir_strcmp(szErr, "FederatedQueryFailure") == 0)
status = 4;
- else if (strcmp(szErr, "EmailDomainIsFederated") == 0)
+ else if (mir_strcmp(szErr, "EmailDomainIsFederated") == 0)
status = 2;
- else if (strcmp(szErr, "BadEmailArgument") == 0)
+ else if (mir_strcmp(szErr, "BadEmailArgument") == 0)
status = 4;
- else if (strcmp(szErr, "ContactAlreadyExists") == 0) {
+ else if (mir_strcmp(szErr, "ContactAlreadyExists") == 0) {
status = 3;
ezxml_t node = getSoapFault(xmlm, false);
@@ -1523,7 +1523,7 @@ unsigned CMsnProto::MSN_ABContactAdd(const char* szEmail, const char* szNick, in setString(hContact, "ID", szContId);
}
}
- else if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ else if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABContactAdd(szEmail, szNick, netId, NULL, search, retry, false);
}
@@ -1621,7 +1621,7 @@ void CMsnProto::MSN_ABUpdateDynamicItem(bool allowRecurse) UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABUpdateDynamicItem(false);
}
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp index 9bbe50fb89..42a6d9ae8f 100644 --- a/protocols/MSN/src/msn_soapstore.cpp +++ b/protocols/MSN/src/msn_soapstore.cpp @@ -135,7 +135,7 @@ bool CMsnProto::MSN_StoreCreateProfile(bool allowRecurse) else if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateProfile(false) ? 200 : 500;
}
@@ -176,7 +176,7 @@ bool CMsnProto::MSN_StoreShareItem(const char* id, bool allowRecurse) if (tResult != NULL && status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateProfile(false) ? 200 : 500;
}
@@ -280,7 +280,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) ezxml_t docstr = ezxml_get(photo, "DocumentStreams", 0, "DocumentStream", -1);
while (docstr) {
const char *docname = ezxml_txt(ezxml_child(docstr, "DocumentStreamName"));
- if (!strcmp(docname, "UserTileStatic")) {
+ if (!mir_strcmp(docname, "UserTileStatic")) {
getMyAvatarFile(ezxml_txt(ezxml_child(docstr, "PreAuthURL")), _T("miranda_avatar.tmp"));
break;
}
@@ -292,7 +292,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) else if (status == 500 && allowRecurse) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
MSN_StoreGetProfile(false);
}
@@ -363,7 +363,7 @@ bool CMsnProto::MSN_StoreUpdateProfile(const char* szNick, const char* szStatus, else if (status == 500 && allowRecurse) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
status = MSN_StoreUpdateProfile(szNick, szStatus, lock, false) ? 200 : 500;
}
@@ -421,7 +421,7 @@ bool CMsnProto::MSN_StoreCreateRelationships(bool allowRecurse) if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateRelationships(false) ? 200 : 500;
}
@@ -488,7 +488,7 @@ bool CMsnProto::MSN_StoreDeleteRelationships(bool tile, bool allowRecurse) if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreDeleteRelationships(tile, false) ? 200 : 500;
}
@@ -571,7 +571,7 @@ bool CMsnProto::MSN_StoreCreateDocument(const TCHAR *sztName, const char *szMime else if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateDocument(sztName, szMimeType, szPicData, false) ? 200 : 500;
}
@@ -637,7 +637,7 @@ bool CMsnProto::MSN_StoreUpdateDocument(const TCHAR *sztName, const char *szMime if (status == 500 && allowRecurse) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
status = MSN_StoreUpdateDocument(sztName, szMimeType, szPicData, false) ? 200 : 500;
}
@@ -717,7 +717,7 @@ bool CMsnProto::MSN_StoreFindDocuments(bool allowRecurse) if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreFindDocuments(false) ? 200 : 500;
}
diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index 940b8e2496..8906faa8e8 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -72,7 +72,7 @@ void CMsnProto::MSN_DeleteServerGroup(LPCSTR szId) char szGroupID[100];
if (!db_get_static(msc->hContact, m_szModuleName, "GroupID", szGroupID, sizeof(szGroupID))) {
- if (strcmp(szGroupID, szId) == 0)
+ if (mir_strcmp(szGroupID, szId) == 0)
delSetting(msc->hContact, "GroupID");
}
}
@@ -109,7 +109,7 @@ LPCSTR CMsnProto::MSN_GetGroupByName(const char* pName) {
for (int i = 0; i < m_arGroups.getCount(); i++) {
const ServerGroupItem* p = m_arGroups[i];
- if (strcmp(p->name, pName) == 0)
+ if (mir_strcmp(p->name, pName) == 0)
return p->id;
}
@@ -221,7 +221,7 @@ void CMsnProto::MSN_UploadServerGroups(char* group) DBVARIANT dbv;
if (!db_get_utf(msc->hContact, "CList", "Group", &dbv)) {
char szGroupID[100];
- if (group == NULL || (strcmp(group, dbv.pszVal) == 0 &&
+ if (group == NULL || (mir_strcmp(group, dbv.pszVal) == 0 &&
db_get_static(msc->hContact, m_szModuleName, "GroupID", szGroupID, sizeof(szGroupID)) != 0)) {
MSN_MoveContactToGroup(msc->hContact, dbv.pszVal);
}
@@ -254,7 +254,7 @@ void CMsnProto::MSN_SyncContactToServerGroup(MCONTACT hContact, const char* szCo const char* szGrpNameById = MSN_GetGroupById(szGrpId);
- if (szGrpNameById && (strcmp(szGrpNameById, szGrpName) == 0 ||
+ if (szGrpNameById && (mir_strcmp(szGrpNameById, szGrpName) == 0 ||
(cgrp == NULL && szGrpIdF == NULL)))
szGrpIdF = szGrpId;
else
@@ -264,7 +264,7 @@ void CMsnProto::MSN_SyncContactToServerGroup(MCONTACT hContact, const char* szCo if (szGrpIdF != NULL) {
setString(hContact, "GroupID", szGrpIdF);
const char* szGrpNameById = MSN_GetGroupById(szGrpIdF);
- if (strcmp(szGrpNameById, szGrpName))
+ if (mir_strcmp(szGrpNameById, szGrpName))
db_set_utf(hContact, "CList", "Group", szGrpNameById);
}
else {
@@ -349,7 +349,7 @@ void CMsnProto::msn_storeProfileThread(void* param) char** msgptr = GetStatusMsgLoc(m_iStatus);
char *szStatus = msgptr ? *msgptr : NULL;
- if (param || (msnLastStatusMsg != szStatus && (msnLastStatusMsg && szStatus && strcmp(msnLastStatusMsg, szStatus))))
+ if (param || (msnLastStatusMsg != szStatus && (msnLastStatusMsg && szStatus && mir_strcmp(msnLastStatusMsg, szStatus))))
if (MSN_StoreUpdateProfile(szNick, szStatus, false))
MSN_ABUpdateDynamicItem();
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 1238f17b3f..32de674020 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -99,7 +99,7 @@ INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) if (AI->format != PA_FORMAT_UNKNOWN) {
bool needupdate = true;
if (getString(AI->hContact, "PictSavedContext", &dbv) == 0) {
- needupdate = strcmp(dbv.pszVal, szContext) != 0;
+ needupdate = mir_strcmp(dbv.pszVal, szContext) != 0;
db_free(&dbv);
}
@@ -453,8 +453,8 @@ int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
if (hContact == NULL) {
- if (MyOptions.SlowSend && strcmp(cws->szSetting, "MessageTimeout") == 0 &&
- (strcmp(cws->szModule, "SRMM") == 0 || strcmp(cws->szModule, "SRMsg") == 0)) {
+ if (MyOptions.SlowSend && mir_strcmp(cws->szSetting, "MessageTimeout") == 0 &&
+ (mir_strcmp(cws->szModule, "SRMM") == 0 || mir_strcmp(cws->szModule, "SRMsg") == 0)) {
if (cws->value.dVal < 60000)
MessageBox(NULL, TranslateT("MSN requires message send timeout in your Message window plugin to be not less then 60 sec. Please correct the timeout value."),
TranslateT("MSN Protocol"), MB_OK | MB_ICONINFORMATION);
@@ -462,7 +462,7 @@ int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
}
- if (!strcmp(cws->szSetting, "ApparentMode")) {
+ if (!mir_strcmp(cws->szSetting, "ApparentMode")) {
char tEmail[MSN_MAX_EMAIL_LEN];
if (!db_get_static(hContact, m_szModuleName, "wlid", tEmail, sizeof(tEmail)) ||
!db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail))) {
@@ -479,7 +479,7 @@ int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
- if (!strcmp(cws->szSetting, "MyHandle") && !strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szSetting, "MyHandle") && !mir_strcmp(cws->szModule, "CList")) {
bool isMe = MSN_IsMeByContact(hContact);
if (!isMe || !nickChg) {
char szContactID[100];
|