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 | |
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')
107 files changed, 592 insertions, 592 deletions
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp index 73b8a61b91..a861dccb84 100644 --- a/protocols/AimOscar/src/chat.cpp +++ b/protocols/AimOscar/src/chat.cpp @@ -107,7 +107,7 @@ int CAimProto::OnGCEvent(WPARAM, LPARAM lParam) GCHOOK *gch = (GCHOOK*) lParam;
if (!gch) return 1;
- if (strcmp(gch->pDest->pszModule, m_szModuleName)) return 0;
+ if (mir_strcmp(gch->pDest->pszModule, m_szModuleName)) return 0;
char* id = mir_t2a(gch->pDest->ptszID);
chat_list_item* item = find_chat_by_id(id);
@@ -206,7 +206,7 @@ int CAimProto::OnGCMenuHook(WPARAM, LPARAM lParam) else if ( gcmi->Type == MENU_ON_NICKLIST )
{
char* sn = mir_t2a(gcmi->pszUID);
- if ( !strcmp(username, sn))
+ if ( !mir_strcmp(username, sn))
{
static const struct gc_item Items[] = {
{ TranslateT("User &details"), 10, MENU_ITEM, FALSE },
@@ -265,7 +265,7 @@ chat_list_item* CAimProto::find_chat_by_id(char* id) chat_list_item* item = NULL;
for(int i=0; i<chat_rooms.getCount(); ++i)
{
- if (strcmp(chat_rooms[i].id, id) == 0)
+ if (mir_strcmp(chat_rooms[i].id, id) == 0)
{
item = &chat_rooms[i];
break;
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index 3ae332dc39..1f3a2403d9 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -659,13 +659,13 @@ void CAimProto::process_ssi_list(SNAC &snac, int &offset) bool ok = false;
DBVARIANT dbv;
if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0]) {
- ok = strcmp(group, dbv.pszVal) == 0;
+ ok = mir_strcmp(group, dbv.pszVal) == 0;
db_free(&dbv);
}
- else ok = strcmp(group, AIM_DEFAULT_GROUP) == 0;
+ else ok = mir_strcmp(group, AIM_DEFAULT_GROUP) == 0;
if (!ok) {
- if (strcmp(group, AIM_DEFAULT_GROUP))
+ if (mir_strcmp(group, AIM_DEFAULT_GROUP))
db_set_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, group);
else
db_unset(hContact, MOD_KEY_CL, OTH_KEY_GP);
@@ -1181,7 +1181,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho }
else if (tlv.cmp(0x2712)) {
char* enc = tlv.dup();
- utf_fname = strcmp(enc, "utf-8") == 0;
+ utf_fname = mir_strcmp(enc, "utf-8") == 0;
mir_free(enc);
}
else if (tlv.cmp(0x2713)) {
@@ -1204,7 +1204,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho }
else if (tlv.cmp(0x000d)) {
char* enc = tlv.dup();
- unicode_descr = strcmp(enc, "unicode-2-0") == 0;
+ unicode_descr = mir_strcmp(enc, "unicode-2-0") == 0;
mir_free(enc);
}
i += TLV_HEADER_SIZE + tlv.len();
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index 886e001ef3..5097b0d080 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -117,9 +117,9 @@ int CAimProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && hContact)
+ if (mir_strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && hContact)
{
- if (strcmp(cws->szSetting, AIM_KEY_NL) == 0)
+ if (mir_strcmp(cws->szSetting, AIM_KEY_NL) == 0)
{
if (cws->value.type == DBVT_DELETED)
{
@@ -133,7 +133,7 @@ int CAimProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) add_contact_to_group(hContact, AIM_DEFAULT_GROUP);
}
}
- else if (strcmp(cws->szSetting, "MyHandle") == 0)
+ else if (mir_strcmp(cws->szSetting, "MyHandle") == 0)
{
char* name;
switch (cws->value.type)
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 36acbcef17..b9449f78fb 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -70,7 +70,7 @@ HICON LoadIconEx(const char* name, bool big) HANDLE GetIconHandle(const char* name)
{
for (int i=0; i < SIZEOF(iconList); i++)
- if ( !strcmp(iconList[i].szName, name))
+ if ( !mir_strcmp(iconList[i].szName, name))
return iconList[i].hIcolib;
return NULL;
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index a01c6e54d7..2d2ba33223 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -694,7 +694,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar GetDlgItemTextA(hwndDlg, IDC_FNAME, name, SIZEOF(name));
if (mir_strlen(trim_str(name)) > 0 && !ppro->getString(AIM_KEY_SN, &dbv))
{
- if (strcmp(name, dbv.pszVal))
+ if (mir_strcmp(name, dbv.pszVal))
ppro->aim_admin_format_name(ppro->hAdminConn,ppro->admin_seqno,name);
db_free(&dbv);
}
@@ -703,7 +703,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar GetDlgItemTextA(hwndDlg, IDC_CEMAIL, email, SIZEOF(email));
if (mir_strlen(trim_str(email)) > 1 && !ppro->getString(AIM_KEY_EM, &dbv)) // Must be greater than 1 or a SNAC error is thrown.
{
- if (strcmp(email, dbv.pszVal))
+ if (mir_strcmp(email, dbv.pszVal))
ppro->aim_admin_change_email(ppro->hAdminConn,ppro->admin_seqno,email);
db_free(&dbv);
}
@@ -719,7 +719,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar // AOL only requires that you send the current password and a (single) new password.
// Let's allow the client to type (two) new passwords incase they make a mistake so we
// can handle any input error locally.
- if (strcmp(npw1,npw2) == 0)
+ if (mir_strcmp(npw1,npw2) == 0)
{
ppro->aim_admin_change_password(ppro->hAdminConn,ppro->admin_seqno,cpw,npw1);
}
@@ -891,7 +891,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP //HN
GetDlgItemTextA(hwndDlg, IDC_HN, str, SIZEOF(str));
- if (str[0] != 0 && strcmp(str, AIM_DEFAULT_SERVER))
+ if (str[0] != 0 && mir_strcmp(str, AIM_DEFAULT_SERVER))
ppro->setString(AIM_KEY_HN, str);
else
ppro->delSetting(AIM_KEY_HN);
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index ea7dafe878..ce2fac297a 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -160,7 +160,7 @@ unsigned short CAimProto::get_default_port(void) bool CAimProto::is_my_contact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
- return szProto != NULL && strcmp(m_szModuleName, szProto) == 0;
+ return szProto != NULL && mir_strcmp(m_szModuleName, szProto) == 0;
}
MCONTACT CAimProto::find_chat_contact(const char* room)
@@ -168,7 +168,7 @@ MCONTACT CAimProto::find_chat_contact(const char* room) for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv)) {
- bool found = !strcmp(room, dbv.pszVal);
+ bool found = !mir_strcmp(room, dbv.pszVal);
db_free(&dbv);
if (found)
return hContact;
@@ -184,7 +184,7 @@ MCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool tempo for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (!getString(hContact, AIM_KEY_SN, &dbv)) {
- bool found = !strcmp(norm_sn, dbv.pszVal);
+ bool found = !mir_strcmp(norm_sn, dbv.pszVal);
db_free(&dbv);
if (found)
return hContact;
@@ -239,7 +239,7 @@ void CAimProto::add_contact_to_group(MCONTACT hContact, const char* new_group) unsigned short old_group_id = getGroupId(hContact, 1);
char* old_group = group_list.find_name(old_group_id);
- if (old_group && strcmp(new_group, old_group) == 0)
+ if (old_group && mir_strcmp(new_group, old_group) == 0)
return;
DBVARIANT dbv;
@@ -260,7 +260,7 @@ void CAimProto::add_contact_to_group(MCONTACT hContact, const char* new_group) debugLogA("Contact %u not on list.", hContact);
setGroupId(hContact, 1, new_group_id);
- if (new_group && strcmp(new_group, AIM_DEFAULT_GROUP))
+ if (new_group && mir_strcmp(new_group, AIM_DEFAULT_GROUP))
db_set_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, new_group);
else
db_unset(hContact, MOD_KEY_CL, OTH_KEY_GP);
@@ -364,7 +364,7 @@ char* trim_str(char* s) void create_group(const char *group)
{
- if (strcmp(group, AIM_DEFAULT_GROUP) == 0) return;
+ if (mir_strcmp(group, AIM_DEFAULT_GROUP) == 0) return;
TCHAR* szGroupName = mir_utf8decodeT(group);
Clist_CreateGroup(0, szGroupName);
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index fe13fa4aaf..c66d128c05 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -289,7 +289,7 @@ void CMLan::OnRecvPacket(u_char* mes, int len, in_addr from) } else { - if (pak.strName && strcmp(pak.strName, cont->m_nick) != 0) + if (pak.strName && mir_strcmp(pak.strName, cont->m_nick) != 0) { delete[] cont->m_nick; int nlen = (int)mir_strlen(pak.strName); @@ -520,7 +520,7 @@ void CMLan::SearchExt(TDataHolder* hold) TContact* cont = m_pRootContact; while (cont) { - if (strcmp(hold->msg, cont->m_nick) == 0 || strcmp(hold->msg, "*") == 0) + if (mir_strcmp(hold->msg, cont->m_nick) == 0 || mir_strcmp(hold->msg, "*") == 0) { char buf[MAX_HOSTNAME_LEN]; mir_tstrcpy(buf, cont->m_nick); diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 6db84be8b9..f19990da10 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -39,7 +39,7 @@ void FacebookProto::UpdateChat(const TCHAR *tchat_id, const char *id, const char gce.ptszText = ttext; gce.time = timestamp ? timestamp : ::time(NULL); if (id != NULL) - gce.bIsMe = !strcmp(id, facy.self_.user_id.c_str()); + gce.bIsMe = !mir_strcmp(id, facy.self_.user_id.c_str()); gce.dwFlags |= GCEF_ADDTOLOG; if (is_old) { gce.dwFlags |= GCEF_NOTNOTIFY; @@ -67,7 +67,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) { GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam); - if (strcmp(hook->pDest->pszModule, m_szModuleName)) + if (mir_strcmp(hook->pDest->pszModule, m_szModuleName)) return 0; // Ignore for special chatrooms @@ -177,7 +177,7 @@ void FacebookProto::AddChatContact(const TCHAR *tchat_id, const char *id, const gce.ptszNick = tnick; gce.ptszUID = tid; gce.time = ::time(NULL); - gce.bIsMe = !strcmp(id, facy.self_.user_id.c_str()); + gce.bIsMe = !mir_strcmp(id, facy.self_.user_id.c_str()); if (gce.bIsMe) { gce.ptszStatus = TranslateT("Myself"); @@ -197,7 +197,7 @@ void FacebookProto::AddChatContact(const TCHAR *tchat_id, const char *id, const void FacebookProto::RemoveChatContact(const TCHAR *tchat_id, const char *id, const char *name) { // We dont want to remove our self-contact from chat. Ever. - if (!strcmp(id, facy.self_.user_id.c_str())) + if (!mir_strcmp(id, facy.self_.user_id.c_str())) return; ptrT tnick(mir_a2t_cp(name, CP_UTF8)); diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index b0bd083ad6..e4cd53e091 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -27,7 +27,7 @@ void updateStringUtf(FacebookProto *proto, MCONTACT hContact, const char *key, c DBVARIANT dbv; if (!proto->getStringUtf(hContact, key, &dbv)) { - update_required = strcmp(dbv.pszVal, value.c_str()) != 0; + update_required = mir_strcmp(dbv.pszVal, value.c_str()) != 0; db_free(&dbv); } @@ -67,7 +67,7 @@ void FacebookProto::SaveName(MCONTACT hContact, const facebook_user *fbu) bool FacebookProto::IsMyContact(MCONTACT hContact, bool include_chat) { const char *proto = GetContactProto(hContact); - if (proto && !strcmp(m_szModuleName, proto)) { + if (proto && !mir_strcmp(m_szModuleName, proto)) { if (include_chat) return true; return !isChatRoom(hContact); @@ -130,7 +130,7 @@ MCONTACT FacebookProto::ContactIDToHContact(const std::string &user_id) continue; ptrA id(getStringA(hContact, FACEBOOK_KEY_ID)); - if (id && !strcmp(id, user_id.c_str())) { + if (id && !mir_strcmp(id, user_id.c_str())) { facy.user_id_to_hcontact.insert(std::make_pair(user_id, hContact)); return hContact; } @@ -158,7 +158,7 @@ std::string FacebookProto::ThreadIDToContactID(const std::string &thread_id) continue; ptrA tid(getStringA(hContact, FACEBOOK_KEY_TID)); - if (tid && !strcmp(tid, thread_id.c_str())) { + if (tid && !mir_strcmp(tid, thread_id.c_str())) { ptrA id(getStringA(hContact, FACEBOOK_KEY_ID)); std::string user_id = (id ? id : ""); if (!user_id.empty()) { @@ -235,7 +235,7 @@ void FacebookProto::LoadParticipantsNames(facebook_chatroom *fbc) { for (std::map<std::string, std::string>::iterator it = fbc->participants.begin(); it != fbc->participants.end(); ++it) { if (it->second.empty()) { - if (!strcmp(it->first.c_str(), facy.self_.user_id.c_str())) + if (!mir_strcmp(it->first.c_str(), facy.self_.user_id.c_str())) it->second = facy.self_.real_name; else { MCONTACT hContact = ContactIDToHContact(it->first.c_str()); diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c36953563a..c5687cc899 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -217,7 +217,7 @@ void FacebookProto::ProcessFriendList(void*) // Update username ptrA username(getStringA(hContact, FACEBOOK_KEY_USERNAME)); - if (!username || strcmp(username, fbu->username.c_str())) { + if (!username || mir_strcmp(username, fbu->username.c_str())) { if (!fbu->username.empty()) setString(hContact, FACEBOOK_KEY_USERNAME, fbu->username.c_str()); else @@ -725,7 +725,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo // Save TID if not exists already ptrA tid(getStringA(hChatContact, FACEBOOK_KEY_TID)); - if (!tid || strcmp(tid, messages[i]->thread_id.c_str())) + if (!tid || mir_strcmp(tid, messages[i]->thread_id.c_str())) setString(hChatContact, FACEBOOK_KEY_TID, messages[i]->thread_id.c_str()); // Try to map name of this chat participant to his id @@ -775,7 +775,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo // Save TID if not exists already ptrA tid(getStringA(hContact, FACEBOOK_KEY_TID)); - if (!tid || strcmp(tid, messages[i]->thread_id.c_str())) + if (!tid || mir_strcmp(tid, messages[i]->thread_id.c_str())) setString(hContact, FACEBOOK_KEY_TID, messages[i]->thread_id.c_str()); if (messages[i]->isIncoming && messages[i]->isUnread && messages[i]->type == MESSAGE) { @@ -961,7 +961,7 @@ void FacebookProto::ProcessFriendRequests(void*) bool isNew = false; ptrA oldTime(getStringA(hContact, "RequestTime")); - if (oldTime == NULL || strcmp(oldTime, time.c_str())) { + if (oldTime == NULL || mir_strcmp(oldTime, time.c_str())) { // This is new request isNew = true; setString(hContact, "RequestTime", time.c_str()); diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index a8a65bc88a..afa5303574 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -616,7 +616,7 @@ int FacebookProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) int FacebookProto::OnPreCreateEvent(WPARAM, LPARAM lParam) { MessageWindowEvent *evt = (MessageWindowEvent *)lParam; - if (strcmp(GetContactProto(evt->hContact), m_szModuleName)) + if (mir_strcmp(GetContactProto(evt->hContact), m_szModuleName)) return 0; std::map<int, time_t>::iterator it = facy.messages_timestamp.find(evt->seq); @@ -854,7 +854,7 @@ MCONTACT FacebookProto::HContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return INVALID_CONTACT_ID; - if (strcmp(dbei.szModule, m_szModuleName)) + if (mir_strcmp(dbei.szModule, m_szModuleName)) return INVALID_CONTACT_ID; return DbGetAuthEventContact(&dbei); diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index bf3e953cc3..50ff063a14 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -57,7 +57,7 @@ void InitIcons(void) HANDLE GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return icons[i].hIcolib;
return 0;
@@ -71,7 +71,7 @@ static FacebookProto * GetInstanceByHContact(MCONTACT hContact) return 0;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(proto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 259f32aca4..1c8ff22dbd 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -441,7 +441,7 @@ static void sttCreateInstance(LPCSTR szModuleName) return;
ptrA host(db_get_sa(NULL, szModuleName, "ManualHost"));
- if (host == NULL || strcmp(host, "talk.google.com"))
+ if (host == NULL || mir_strcmp(host, "talk.google.com"))
return;
GoogleTalkAcc *gta = new GoogleTalkAcc();
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index c026f4afc6..b9020142e1 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -724,12 +724,12 @@ retry: {
if (res->seq == GG_SEQ_CHINFO)
setByte(hContact, GG_KEY_PD_GANDER,
- (BYTE)(!strcmp(__gender, GG_PUBDIR50_GENDER_SET_MALE) ? 'M' :
- (!strcmp(__gender, GG_PUBDIR50_GENDER_SET_FEMALE) ? 'F' : '?')));
+ (BYTE)(!mir_strcmp(__gender, GG_PUBDIR50_GENDER_SET_MALE) ? 'M' :
+ (!mir_strcmp(__gender, GG_PUBDIR50_GENDER_SET_FEMALE) ? 'F' : '?')));
else
setByte(hContact, GG_KEY_PD_GANDER,
- (BYTE)(!strcmp(__gender, GG_PUBDIR50_GENDER_MALE) ? 'M' :
- (!strcmp(__gender, GG_PUBDIR50_GENDER_FEMALE) ? 'F' : '?')));
+ (BYTE)(!mir_strcmp(__gender, GG_PUBDIR50_GENDER_MALE) ? 'M' :
+ (!mir_strcmp(__gender, GG_PUBDIR50_GENDER_FEMALE) ? 'F' : '?')));
}
else if (res->seq == GG_SEQ_CHINFO)
{
@@ -843,7 +843,7 @@ retry: }
}
// Check if not empty message ( who needs it? )
- else if (!e->event.msg.recipients_count && e->event.msg.message && *e->event.msg.message && strcmp(e->event.msg.message, "\xA0\0"))
+ else if (!e->event.msg.recipients_count && e->event.msg.message && *e->event.msg.message && mir_strcmp(e->event.msg.message, "\xA0\0"))
{
PROTORECVEVENT pre = {0};
time_t t = time(NULL);
@@ -915,7 +915,7 @@ retry: }
}
else if (!e->event.multilogon_msg.recipients_count && e->event.multilogon_msg.message && *e->event.multilogon_msg.message
- && strcmp(e->event.multilogon_msg.message, "\xA0\0"))
+ && mir_strcmp(e->event.multilogon_msg.message, "\xA0\0"))
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = m_szModuleName;
@@ -1170,7 +1170,7 @@ retry: sender = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
debugLogA("mainthread() (%x): XML Action type: %s.", this, type != NULL ? type : "unknown");
// Avatar change notify
- if (type != NULL && !strcmp(type, "28")) {
+ if (type != NULL && !mir_strcmp(type, "28")) {
debugLogA("mainthread() (%x): Client %s changed his avatar.", this, sender);
requestAvatarInfo(getcontact(atoi(sender), 0, 0, NULL), 0);
}
@@ -1334,14 +1334,14 @@ int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam) return 0;
// If contact has been blocked
- if (!strcmp(cws->szModule, m_szModuleName) && !strcmp(cws->szSetting, GG_KEY_BLOCK))
+ if (!mir_strcmp(cws->szModule, m_szModuleName) && !mir_strcmp(cws->szSetting, GG_KEY_BLOCK))
{
notifyuser(hContact, 1);
return 0;
}
// Contact is being renamed
- if (gc_enabled && !strcmp(cws->szModule, m_szModuleName) && !strcmp(cws->szSetting, GG_KEY_NICK)){
+ if (gc_enabled && !mir_strcmp(cws->szModule, m_szModuleName) && !mir_strcmp(cws->szSetting, GG_KEY_NICK)){
TCHAR* ptszVal = sttSettingToTchar(&(cws->value));
if(ptszVal==NULL) return 0;
@@ -1372,10 +1372,10 @@ int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam) }
// Contact list changes
- if (!strcmp(cws->szModule, "CList"))
+ if (!mir_strcmp(cws->szModule, "CList"))
{
// If name changed... change nick
- if (!strcmp(cws->szSetting, "MyHandle")){
+ if (!mir_strcmp(cws->szSetting, "MyHandle")){
TCHAR* ptszVal = sttSettingToTchar(&(cws->value));
if(ptszVal==NULL) return 0;
setTString(hContact, GG_KEY_NICK, ptszVal);
@@ -1383,7 +1383,7 @@ int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam) }
// If not on list changed
- if (!strcmp(cws->szSetting, "NotOnList"))
+ if (!mir_strcmp(cws->szSetting, "NotOnList"))
{
if (db_get_b(hContact, "CList", "Hidden", 0))
return 0;
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 50616a407b..a75e6ef516 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -194,7 +194,7 @@ void GGPROTO::checknewuser(uin_t uin, const char* passwd) db_free(&dbv); } - if (uin > 0 && mir_strlen(passwd) > 0 && (uin != olduin || strcmp(oldpasswd, passwd))) + if (uin > 0 && mir_strlen(passwd) > 0 && (uin != olduin || mir_strcmp(oldpasswd, passwd))) check_first_conn = 1; } @@ -928,7 +928,7 @@ int GGPROTO::details_init(WPARAM wParam, LPARAM lParam) char* szProto = GetContactProto(hContact); if (szProto == NULL) return 0; - if (strcmp(szProto, m_szModuleName) || isChatRoom(hContact)) + if (mir_strcmp(szProto, m_szModuleName) || isChatRoom(hContact)) return 0; pszTemplate = MAKEINTRESOURCEA(IDD_INFO_GG); } diff --git a/protocols/Gadu-Gadu/src/dynstuff.cpp b/protocols/Gadu-Gadu/src/dynstuff.cpp index 17ce53a534..4d21ed7eb0 100644 --- a/protocols/Gadu-Gadu/src/dynstuff.cpp +++ b/protocols/Gadu-Gadu/src/dynstuff.cpp @@ -584,7 +584,7 @@ int array_contains(char **array, const char *string, int casesensitive) return 0;
for (i = 0; array[i]; i++) {
- if (casesensitive && !strcmp(array[i], string))
+ if (casesensitive && !mir_strcmp(array[i], string))
return 1;
if (!casesensitive && !strcasecmp(array[i], string))
return 1;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 9a79056216..45fd51745f 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -203,7 +203,7 @@ static GGPROTO* gg_getprotoinstance(MCONTACT hContact) return NULL;
for (int i=0; i < g_Instances.getCount(); i++)
- if (strcmp(szProto, g_Instances[i]->m_szModuleName) == 0)
+ if (mir_strcmp(szProto, g_Instances[i]->m_szModuleName) == 0)
return g_Instances[i];
return NULL;
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index 5a8455422b..4f394aae89 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -46,8 +46,8 @@ typedef enum static int paramsortFunc(const OAUTHPARAMETER *p1, const OAUTHPARAMETER *p2)
{
- int res = strcmp(p1->name, p2->name);
- return res != 0 ? res : strcmp(p1->value, p2->value);
+ int res = mir_strcmp(p1->name, p2->name);
+ return res != 0 ? res : mir_strcmp(p1->value, p2->value);
}
// see RFC 3986 for details
@@ -106,7 +106,7 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> ¶ms, const char *httpmet for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, "oauth_signature")) continue;
+ if (!mir_strcmp(p->name, "oauth_signature")) continue;
if (i > 0) size += 3;
size += (int)mir_strlen(p->name) + (int)mir_strlen(p->value) + 3;
}
@@ -120,7 +120,7 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> ¶ms, const char *httpmet for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, "oauth_signature")) continue;
+ if (!mir_strcmp(p->name, "oauth_signature")) continue;
if (i > 0) strcat(res, "%26");
strcat(res, p->name);
strcat(res, "%3D");
@@ -139,7 +139,7 @@ char *oauth_getparam(LIST<OAUTHPARAMETER> ¶ms, const char *name) for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, name))
+ if (!mir_strcmp(p->name, name))
return p->value;
}
@@ -155,7 +155,7 @@ void oauth_setparam(LIST<OAUTHPARAMETER> ¶ms, const char *name, const char * for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, name)) {
+ if (!mir_strcmp(p->name, name)) {
mir_free(p->value);
p->value = oauth_uri_escape(value);
return;
@@ -190,7 +190,7 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> ¶ms, const char *httpmethod, con signmethod = oauth_getparam(params, "oauth_signature_method");
if (signmethod == NULL) return -1;
- if (!strcmp(signmethod, "HMAC-SHA1")) {
+ if (!mir_strcmp(signmethod, "HMAC-SHA1")) {
ptrA text( oauth_generate_signature(params, httpmethod, url));
ptrA csenc( oauth_uri_escape(consumer_secret));
ptrA tsenc( oauth_uri_escape(token_secret));
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 1d8994cc44..d9f06b06aa 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -230,7 +230,7 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) ptrA AvatarSavedHash( getStringA(pai->hContact, GG_KEY_AVATARHASH));
if (AvatarHash != NULL && AvatarSavedHash != NULL) {
getAvatarFilename(pai->hContact, pai->filename, SIZEOF(pai->filename));
- if (!strcmp(AvatarHash, AvatarSavedHash)) {
+ if (!mir_strcmp(AvatarHash, AvatarSavedHash)) {
if (_taccess(pai->filename, 0) == 0){
debugLogA("getavatarinfo(): Incoming request for avatar information. uin=%d. Avatar hash unchanged. return GAIR_SUCCESS", uin);
return GAIR_SUCCESS;
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 8218acdf79..b1625f4471 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -185,7 +185,7 @@ static INT_PTR CALLBACK gg_sessions_viewdlg(HWND hwndDlg, UINT message, WPARAM w case HM_PROTOACK:
{
ACKDATA* ack = (ACKDATA*)lParam;
- if (!strcmp(ack->szModule, gg->m_szModuleName) && !ack->hContact && ack->type == ACKTYPE_STATUS
+ if (!mir_strcmp(ack->szModule, gg->m_szModuleName) && !ack->hContact && ack->type == ACKTYPE_STATUS
&& ack->result == ACKRESULT_SUCCESS && (ack->lParam == ID_STATUS_OFFLINE
|| (ack->hProcess == (HANDLE)ID_STATUS_CONNECTING && ack->lParam != ID_STATUS_OFFLINE
&& !ListView_GetItemCount(GetDlgItem(hwndDlg, IDC_SESSIONS)))))
diff --git a/protocols/Gadu-Gadu/src/userutils.cpp b/protocols/Gadu-Gadu/src/userutils.cpp index 8c47ebe3a6..a5fcae5ee3 100644 --- a/protocols/Gadu-Gadu/src/userutils.cpp +++ b/protocols/Gadu-Gadu/src/userutils.cpp @@ -226,7 +226,7 @@ INT_PTR CALLBACK gg_userutildlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA BOOL enable;
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, pass, SIZEOF(pass));
GetDlgItemTextA(hwndDlg, IDC_CPASSWORD, cpass, SIZEOF(cpass));
- enable = mir_strlen(pass) && mir_strlen(cpass) && !strcmp(cpass, pass);
+ enable = mir_strlen(pass) && mir_strlen(cpass) && !mir_strcmp(cpass, pass);
if (dat && dat->mode == GG_USERUTIL_REMOVE)
EnableWindow(GetDlgItem(hwndDlg, IDOK), IsDlgButtonChecked(hwndDlg, IDC_CONFIRM) ? enable : FALSE);
else
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index 29fcebed90..65fbaf3bed 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -1163,7 +1163,7 @@ void ICQ::updateContactList() for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- if (proto && !strcmp(proto, protoName))
+ if (proto && !mir_strcmp(proto, protoName))
{
if ((u = getUserByContact(hContact)) == NULL)
{
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index fcc37c8dbd..939fc619fc 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -111,7 +111,7 @@ static INT_PTR icqAuthAllow(WPARAM wParam, LPARAM lParam) dbei.pBlob = (PBYTE)&uin;
if (CallService(MS_DB_EVENT_GET, wParam, (LPARAM)&dbei)) return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1;
- if (strcmp(dbei.szModule, ICQOSCPROTONAME)) return 1;
+ if (mir_strcmp(dbei.szModule, ICQOSCPROTONAME)) return 1;
if (uin <= 1) return 1;
icq_sendAuthGrantedServ(uin);
*/
diff --git a/protocols/ICQCorp/src/user.cpp b/protocols/ICQCorp/src/user.cpp index ac37dfdb05..c70054e095 100644 --- a/protocols/ICQCorp/src/user.cpp +++ b/protocols/ICQCorp/src/user.cpp @@ -144,7 +144,7 @@ int icqUserInfoInitialise(WPARAM wParam, LPARAM lParam) char *proto;
proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, lParam, 0);
- if ((proto == NULL || strcmp(proto, protoName)) && lParam) return 0;
+ if ((proto == NULL || mir_strcmp(proto, protoName)) && lParam) return 0;
odp.position = -1900000000;
odp.pszTitle = Translate(protoName);
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index 0da567113c..743dbe1741 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -35,7 +35,7 @@ OBJLIST<SERVER_INFO> g_servers( 20, CompareServers ); static int sttCompareProtocols(const CIrcProto *p1, const CIrcProto *p2)
{
- return strcmp(p1->m_szModuleName, p2->m_szModuleName);
+ return mir_strcmp(p1->m_szModuleName, p2->m_szModuleName);
}
LIST<CIrcProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 0376a9d6a2..c1a816cb9f 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -93,7 +93,7 @@ static CIrcProto* IrcGetInstanceByHContact(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;
@@ -975,13 +975,13 @@ int __cdecl CIrcProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, "CList"))
+ if (mir_strcmp(cws->szModule, "CList"))
return 0;
if (cws->value.type != DBVT_DELETED && !(cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
return 0;
- if (!strcmp(cws->szSetting, "NotOnList")) {
+ if (!mir_strcmp(cws->szSetting, "NotOnList")) {
DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
if (getByte("MirVerAutoRequest", 1))
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index ddac73b1c4..51accea275 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -677,7 +677,7 @@ void CQuickDlg::OnServerCombo(CCtrlData*) CheckDlgButton(m_hwnd, IDC_SSL_AUTO, BST_UNCHECKED);
}
- if (!strcmp(pData->m_name, Translate("---- Not listed server ----"))) {
+ if (!mir_strcmp(pData->m_name, Translate("---- Not listed server ----"))) {
SendDlgItemMessage(m_hwnd, IDC_SERVER, EM_SETREADONLY, false, 0);
SendDlgItemMessage(m_hwnd, IDC_PORT, EM_SETREADONLY, false, 0);
SendDlgItemMessage(m_hwnd, IDC_PORT2, EM_SETREADONLY, false, 0);
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp index a9aa778cb1..3ba378541f 100644 --- a/protocols/IcqOscarJ/src/icq_db.cpp +++ b/protocols/IcqOscarJ/src/icq_db.cpp @@ -174,7 +174,7 @@ void CIcqProto::setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAns db_free(&dbv);
}
- if (!oldStatusMsg || strcmp(oldStatusMsg, szStatusMsg))
+ if (!oldStatusMsg || mir_strcmp(oldStatusMsg, szStatusMsg))
db_set_utf(hContact, "CList", "StatusMsg", szStatusMsg);
SAFE_FREE(&oldStatusMsg);
if (isAnsi) SAFE_FREE(&szStatusMsg);
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index 4b93e445fc..e0a276de55 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -32,7 +32,7 @@ HANDLE g_hContactMenuSvc[6]; static int sttCompareProtocols(const CIcqProto *p1, const CIcqProto *p2)
{
- return strcmp(p1->m_szModuleName, p2->m_szModuleName);
+ return mir_strcmp(p1->m_szModuleName, p2->m_szModuleName);
}
LIST<CIcqProto> g_Instances(1, sttCompareProtocols);
@@ -44,7 +44,7 @@ static CIcqProto* IcqGetInstanceByHContact(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/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index 8799ea7c79..37c4e6e12f 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -581,11 +581,11 @@ char* strUID(DWORD dwUIN, char *pszUID) }
-/* a strcmp() that likes NULL */
+/* a mir_strcmp() that likes NULL */
int __fastcall strcmpnull(const char *str1, const char *str2)
{
if (str1 && str2)
- return strcmp(str1, str2);
+ return mir_strcmp(str1, str2);
if (!str1 && !str2)
return 0;
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 40545f9203..b271da6373 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -218,7 +218,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) NETLIBIPLIST* ihaddr = (NETLIBIPLIST*)CallService(MS_NETLIB_GETMYIP, 1, 0);
for (unsigned i=0; i < ihaddr->cbNum; i++)
- if (strcmp(localAddr, ihaddr->szIp[i]))
+ if (mir_strcmp(localAddr, ihaddr->szIp[i]))
query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) << XATTR(_T("host"), _A2T(ihaddr->szIp[i])) << XATTRI(_T("port"), nlb.wPort);
mir_free(ihaddr);
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 927fb6c405..ab33180bd2 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -162,14 +162,14 @@ int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, "CList"))
+ if (mir_strcmp(cws->szModule, "CList"))
return 0;
- if (!strcmp(cws->szSetting, "Group"))
+ if (!mir_strcmp(cws->szSetting, "Group"))
OnRenameGroup(cws, hContact);
- else if (!strcmp(cws->szSetting, "MyHandle"))
+ else if (!mir_strcmp(cws->szSetting, "MyHandle"))
OnRenameContact(cws, hContact);
- else if (!strcmp(cws->szSetting, "NotOnList"))
+ else if (!mir_strcmp(cws->szSetting, "NotOnList"))
OnAddContactForever(cws, hContact);
return 0;
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 0a45ead7b0..1c51a3b87e 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -129,7 +129,7 @@ int CJabberProto::FileReceiveParse(filetransfer *ft, char* buffer, int datalen) }
else if ((s = strchr(str, ':')) != NULL) {
*s = '\0';
- if (!strcmp(str, "Content-Length"))
+ if (!mir_strcmp(str, "Content-Length"))
ft->std.totalBytes = ft->std.currentFileSize = _atoi64(s + 1);
}
}
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index a85f2fdaa7..0b582f3548 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -185,7 +185,7 @@ HICON CJabberProto::LoadIconEx(const char* name, bool big) if (HICON result = g_LoadIconEx(name, big))
return result;
- if (!strcmp(name, "main"))
+ if (!mir_strcmp(name, "main"))
return Skin_GetIconByHandle(m_hProtoIcon, big);
return NULL;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 3567c46592..041f665e58 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -193,7 +193,7 @@ void CJabberProto::OnLoggedIn() QueryPrivacyLists(m_ThreadInfo);
ptrA szServerName(getStringA("LastLoggedServer"));
- if (szServerName == NULL || strcmp(m_ThreadInfo->conn.server, szServerName))
+ if (szServerName == NULL || mir_strcmp(m_ThreadInfo->conn.server, szServerName))
SendGetVcard(m_szJabberJID);
setString("LastLoggedServer", m_ThreadInfo->conn.server);
diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h index 69b8ee1f61..39080cca86 100644 --- a/protocols/JabberG/src/jabber_list.h +++ b/protocols/JabberG/src/jabber_list.h @@ -220,7 +220,7 @@ struct JABBER_HTTP_AVATARS ~JABBER_HTTP_AVATARS() { mir_free(Url); }
static int compare(const JABBER_HTTP_AVATARS *p1, const JABBER_HTTP_AVATARS *p2)
- { return strcmp(p1->Url, p2->Url); }
+ { return mir_strcmp(p1->Url, p2->Url); }
};
#endif
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 5c2715f7bf..2c1b351fe6 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -80,7 +80,7 @@ static CJabberProto* JabberGetInstanceByHContact(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/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index a471b49703..79ce43efeb 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -351,7 +351,7 @@ MCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, MEV return NULL;
if (db_event_get(hDbEvent, &dbei))
return NULL;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return NULL;
/*
@@ -392,7 +392,7 @@ int CJabberProto::Authorize(MEVENT hDbEvent) return 1;
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);
@@ -446,7 +446,7 @@ int CJabberProto::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/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index 3d380eb32a..ce2cafb2fc 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -35,11 +35,11 @@ TNtlmAuth::TNtlmAuth(ThreadData *info, const char* mechanism, const TCHAR *hostn szHostName = hostname;
const TCHAR *szProvider;
- if (!strcmp(mechanism, "GSS-SPNEGO"))
+ if (!mir_strcmp(mechanism, "GSS-SPNEGO"))
szProvider = _T("Negotiate");
- else if (!strcmp(mechanism, "GSSAPI"))
+ else if (!mir_strcmp(mechanism, "GSSAPI"))
szProvider = _T("GSSAPI");
- else if (!strcmp(mechanism, "NTLM"))
+ else if (!mir_strcmp(mechanism, "NTLM"))
szProvider = _T("NTLM");
else {
LBL_Invalid:
@@ -49,8 +49,8 @@ LBL_Invalid: }
TCHAR szSpn[1024] = _T("");
- if (strcmp(mechanism, "NTLM"))
- if (!getSpn(szSpn, SIZEOF(szSpn)) && !strcmp(mechanism, "GSSAPI"))
+ if (mir_strcmp(mechanism, "NTLM"))
+ if (!getSpn(szSpn, SIZEOF(szSpn)) && !mir_strcmp(mechanism, "GSSAPI"))
goto LBL_Invalid;
if ((hProvider = Netlib_InitSecurityProvider2(szProvider, szSpn)) == NULL)
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 968ec55fab..f43f712e83 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -137,7 +137,7 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) if (::_taccess(AI->filename, 0) == 0) {
ptrA szSavedHash( getStringA(AI->hContact, "AvatarSaved"));
- if (szSavedHash != NULL && !strcmp(szSavedHash, szHashValue)) {
+ if (szSavedHash != NULL && !mir_strcmp(szSavedHash, szHashValue)) {
debugLogA("Avatar is Ok: %s == %s", szSavedHash, szHashValue);
return GAIR_SUCCESS;
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 91cbcd76b9..3b5af188c2 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -811,7 +811,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) } char *szProto = GetContactProto(hContact); - if (szProto != NULL && !strcmp(szProto, m_szModuleName)) { + if (szProto != NULL && !mir_strcmp(szProto, m_szModuleName)) { OPTIONSDIALOGPAGE odp = { 0 }; odp.hInstance = hInst; odp.dwInitParam = (LPARAM)this; diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index e82202ade2..73bc6a6cc8 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -679,7 +679,7 @@ TStringPairs::~TStringPairs() const char* TStringPairs::operator[](const char* key) const
{
for (int i = 0; i < numElems; i++)
- if (!strcmp(elems[i].name, key))
+ if (!mir_strcmp(elems[i].name, key))
return elems[i].value;
return "";
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index f110240a91..9aded8f3e3 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -876,7 +876,7 @@ static int ActivityCheck(LPCTSTR szFirstNode, LPCTSTR szSecondNode) int i = 0, nFirst = -1, nSecond = -1;
while (g_arrActivities[i].szFirst || g_arrActivities[i].szSecond) {
// check first node
- if (g_arrActivities[i].szFirst && !strcmp(s1, g_arrActivities[i].szFirst)) {
+ if (g_arrActivities[i].szFirst && !mir_strcmp(s1, g_arrActivities[i].szFirst)) {
// first part found
nFirst = i;
if (!s2) {
@@ -885,7 +885,7 @@ static int ActivityCheck(LPCTSTR szFirstNode, LPCTSTR szSecondNode) }
i++; // move to next
while (g_arrActivities[i].szSecond) {
- if (!strcmp(g_arrActivities[i].szSecond, s2)) {
+ if (!mir_strcmp(g_arrActivities[i].szSecond, s2)) {
nSecond = i;
break;
}
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 427638fc65..ec6f7f229f 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -166,7 +166,7 @@ MCONTACT CMraProto::AddToListByEvent(int, int, MEVENT hDbEvent) if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) != -1) {
dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDbEvent, &dbei) == 0 &&
- !strcmp(dbei.szModule, m_szModuleName) &&
+ !mir_strcmp(dbei.szModule, m_szModuleName) &&
(dbei.eventType == EVENTTYPE_AUTHREQUEST || dbei.eventType == EVENTTYPE_CONTACTS))
{
char *nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
@@ -192,7 +192,7 @@ int CMraProto::Authorize(MEVENT hDBEvent) dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDBEvent, &dbei)) return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1;
- if (strcmp(dbei.szModule, m_szModuleName)) return 1;
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1;
LPSTR lpszNick = (LPSTR)(dbei.pBlob + sizeof(DWORD) * 2);
LPSTR lpszFirstName = lpszNick + mir_strlen(lpszNick) + 1;
@@ -212,7 +212,7 @@ int CMraProto::AuthDeny(MEVENT hDBEvent, const TCHAR* szReason) dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDBEvent, &dbei)) return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1;
- if (strcmp(dbei.szModule, m_szModuleName)) return 1;
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1;
LPSTR lpszNick = (LPSTR)(dbei.pBlob + sizeof(DWORD) * 2);
LPSTR lpszFirstName = lpszNick + mir_strlen(lpszNick) + 1;
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index efeb16445a..044df17ff4 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -196,9 +196,9 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) // ýòî íàø êîíòàêò, îí íå âðåìåííûé (åñòü â ñïèñêå íà ñåðâåðå) è åãî îáíîâëåíèå ðàçðåøåíî
if (IsContactMra(hContact) && !db_get_b(hContact, "CList", "NotOnList", 0) && getDword(hContact, "HooksLocked", FALSE) == FALSE) {
- if (!strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szModule, "CList")) {
// MyHandle setting
- if (!strcmp(cws->szSetting, "MyHandle")) {
+ if (!mir_strcmp(cws->szSetting, "MyHandle")) {
// always store custom nick
CMStringW wszNick;
if (cws->value.type == DBVT_DELETED) {
@@ -222,7 +222,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Group setting
- else if (!strcmp(cws->szSetting, "Group")) {
+ else if (!mir_strcmp(cws->szSetting, "Group")) {
CMStringW wszGroup;
// manage group on server
switch (cws->value.type) {
@@ -243,7 +243,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// NotOnList setting. Has a temporary contact just been added permanently?
- else if (!strcmp(cws->szSetting, "NotOnList")) {
+ else if (!mir_strcmp(cws->szSetting, "NotOnList")) {
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) {
CMStringW wszAuthMessage;
if (!mraGetStringW(NULL, "AuthMessage", wszAuthMessage))
@@ -259,7 +259,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Hidden setting
- else if (!strcmp(cws->szSetting, "Hidden")) {
+ else if (!mir_strcmp(cws->szSetting, "Hidden")) {
DWORD dwContactFlag = GetContactFlags(hContact);
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
dwContactFlag &= ~CONTACT_FLAG_SHADOW;
@@ -270,8 +270,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Ignore section
- else if (!strcmp(cws->szModule, "Ignore")) {
- if (!strcmp(cws->szSetting, "Mask1")) {
+ else if (!mir_strcmp(cws->szModule, "Ignore")) {
+ if (!mir_strcmp(cws->szSetting, "Mask1")) {
DWORD dwContactFlag = GetContactFlags(hContact);
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_DWORD && cws->value.dVal&IGNOREEVENT_MESSAGE) == 0)
dwContactFlag &= ~CONTACT_FLAG_IGNORE;
@@ -282,8 +282,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// User info section
- else if (!strcmp(cws->szModule, "UserInfo")) {
- if (!strcmp(cws->szSetting, "MyPhone0") || !strcmp(cws->szSetting, "MyPhone1") || !strcmp(cws->szSetting, "MyPhone2"))
+ else if (!mir_strcmp(cws->szModule, "UserInfo")) {
+ if (!mir_strcmp(cws->szSetting, "MyPhone0") || !mir_strcmp(cws->szSetting, "MyPhone1") || !mir_strcmp(cws->szSetting, "MyPhone2"))
MraModifyContact(hContact);
}
}
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];
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index f51104b1d9..cacc111d59 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -51,7 +51,7 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam) {
GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam);
- if(strcmp(hook->pDest->pszModule,m_szModuleName))
+ if(mir_strcmp(hook->pDest->pszModule,m_szModuleName))
return 0;
switch(hook->pDest->iType)
@@ -364,7 +364,7 @@ MCONTACT OmegleProto::GetChatHandle() for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) > 0) {
ptrA id = db_get_sa(hContact, m_szModuleName, "ChatRoomId");
- if (id != NULL && !strcmp(id, m_szModuleName))
+ if (id != NULL && !mir_strcmp(id, m_szModuleName))
return hContact;
}
}
diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp index 145baf716c..843eb50ddc 100644 --- a/protocols/Omegle/src/theme.cpp +++ b/protocols/Omegle/src/theme.cpp @@ -40,7 +40,7 @@ HANDLE GetIconHandle(const char* name) {
for(size_t i=0; i<SIZEOF(icons); i++)
{
- if(strcmp(icons[i].szName, name) == 0)
+ if(mir_strcmp(icons[i].szName, name) == 0)
return hIconLibItem[i];
}
return 0;
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 1b97b982a0..e0a01850ac 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -238,7 +238,7 @@ int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg) char *proto = GetContactProto(hContact);
int ret;
- if (!proto || strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
+ if (!proto || mir_strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
TFakeAckParams* tfap = (TFakeAckParams*)mir_alloc(sizeof(TFakeAckParams));
tfap->proto = this;
tfap->hContact = hContact;
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index 223cecfdce..debe054ec3 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -6,7 +6,7 @@ MCONTACT CSametimeProto::FindContactByUserId(const char* id) DBVARIANT dbv;
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
- if (dbv.pszVal && strcmp(id, dbv.pszVal) == 0) {
+ if (dbv.pszVal && mir_strcmp(id, dbv.pszVal) == 0) {
db_free(&dbv);
return hContact;
}
@@ -20,7 +20,7 @@ bool CSametimeProto::GetAwareIdFromContact(MCONTACT hContact, mwAwareIdBlock* id {
char *proto = GetContactProto(hContact);
DBVARIANT dbv;
- if (proto && !strcmp(m_szModuleName, proto)) {
+ if (proto && !mir_strcmp(m_szModuleName, proto)) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal) {
id_block->type = mwAware_USER;
@@ -42,10 +42,10 @@ void CSametimeProto::SetContactGroup(MCONTACT hContact, const char* name) void CSametimeProto::AddGroup(const char* name, bool expanded)
{
- if (name && strcmp(name, "MetaContacts Hidden Group") == 0)
+ if (name && mir_strcmp(name, "MetaContacts Hidden Group") == 0)
return;
- if (name && strcmp(name, Translate("None")) == 0)
+ if (name && mir_strcmp(name, Translate("None")) == 0)
return;
ptrT ptszGroup(mir_utf8decodeT(name));
@@ -182,7 +182,7 @@ void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temp for (; ul; ul = ul->next) {
stuser = (mwSametimeUser*)ul->data;
MCONTACT hContact = AddContact(stuser, temporary);
- if (hContact && group_alias && strcmp(group_alias, Translate("None")) != 0 && strcmp(group_alias, "MetaContacts Hidden Group") != 0) {
+ if (hContact && group_alias && mir_strcmp(group_alias, Translate("None")) != 0 && mir_strcmp(group_alias, "MetaContacts Hidden Group") != 0) {
SetContactGroup(hContact, group_alias);
// mark contact as belonging to dynamic group
}
@@ -439,7 +439,7 @@ void mwResolve_handler_dyngroup_callback(mwServiceResolve* srvc, guint32 id, gui const char* group_name = mwSametimeGroup_getName(stgroup);
const char* group_alias = mwSametimeGroup_getAlias(stgroup);
if (!group_alias) group_alias = group_name;
- if (hContact && group_alias && strcmp(group_alias, Translate("None")) && strcmp(group_alias, "MetaContacts Hidden Group")) {
+ if (hContact && group_alias && mir_strcmp(group_alias, Translate("None")) && mir_strcmp(group_alias, "MetaContacts Hidden Group")) {
proto->SetContactGroup(hContact, group_alias);
}
}
@@ -468,7 +468,7 @@ void mwAwareList_on_aware(mwAwareList* list, mwAwareSnapshot* aware) DBVARIANT dbv;
// update self - necessary for some servers
- if (aware->online && !db_get_utf(0, proto->m_szModuleName, "stid", &dbv) && strcmp(aware->id.user, dbv.pszVal) == 0) {
+ if (aware->online && !db_get_utf(0, proto->m_szModuleName, "stid", &dbv) && mir_strcmp(aware->id.user, dbv.pszVal) == 0) {
int new_status = ID_STATUS_OFFLINE;
switch (aware->status.status) {
@@ -499,7 +499,7 @@ void mwAwareList_on_aware(mwAwareList* list, mwAwareSnapshot* aware) db_free(&dbv);
}
- if (aware->group && (!group || strcmp(aware->group, group) || !hContact)) {
+ if (aware->group && (!group || mir_strcmp(aware->group, group) || !hContact)) {
// dynamic group member we're not already aware of
// resolve server alias to user id via resolver
mwSametimeList* user_list = mwSametimeList_new();
@@ -603,7 +603,7 @@ void CSametimeProto::UserListCreate() GList *gl = 0;
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0 /*&& proto && !strcmp( PROTO, proto)*/) {
+ if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0 /*&& proto && !mir_strcmp( PROTO, proto)*/) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal) {
if (GetAwareIdFromContact(hContact, &id_block)) {
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp index f07139775d..ed10c5d43a 100644 --- a/protocols/SkypeClassic/src/contacts.cpp +++ b/protocols/SkypeClassic/src/contacts.cpp @@ -223,7 +223,7 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM) { DBVARIANT dbv;
BOOL callAvailable = FALSE;
BOOL hangupAvailable = FALSE;
- if (!strcmp(szProto, SKYPE_PROTONAME)) {
+ if (!mir_strcmp(szProto, SKYPE_PROTONAME)) {
if (!db_get(hContact, SKYPE_PROTONAME, "CallId", &dbv)) {
if (db_get_b(hContact, SKYPE_PROTONAME, "OnHold", 0))
mi = ResumeCallItem(); else mi = HoldCallItem();
@@ -306,7 +306,7 @@ int ClistDblClick(WPARAM wParam, LPARAM lParam) { char *szProto;
szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, wParam, 0 );
-if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) &&
+if (szProto!=NULL && !mir_strcmp(szProto, SKYPE_PROTONAME) &&
db_get_w((HANDLE)wParam, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE)==ID_STATUS_ONTHEPHONE) {
SkypeCall(wParam, 0);
}
@@ -326,7 +326,7 @@ MCONTACT find_contact(char *name) if (db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0)
{
if (db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) continue;
- tCompareResult = strcmp(dbv.pszVal, name);
+ tCompareResult = mir_strcmp(dbv.pszVal, name);
db_free(&dbv);
if (tCompareResult) continue;
return hContact; // already there, return handle
@@ -402,7 +402,7 @@ void logoff_contacts(BOOL bCleanup) { LOG(("logoff_contacts: Logging off contacts."));
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME))
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME))
{
if (db_get_w(hContact, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE);
diff --git a/protocols/SkypeClassic/src/filexfer.cpp b/protocols/SkypeClassic/src/filexfer.cpp index af8af1c1cc..f24e7273a7 100644 --- a/protocols/SkypeClassic/src/filexfer.cpp +++ b/protocols/SkypeClassic/src/filexfer.cpp @@ -215,10 +215,10 @@ BOOL FXHandleRecv(PROTORECVEVENT *pre, MCONTACT hContact) for (char *pszMsgNum = strtok(pszXferIDs, ", "); pszMsgNum; pszMsgNum = strtok(NULL, ", ")) {
char *pszStatus = SkypeGetErrID("FILETRANSFER", pszMsgNum, "STATUS");
if (pszStatus) {
- if (!strcmp(pszStatus, "NEW") || !strcmp(pszStatus, "PLACEHOLDER")) {
+ if (!mir_strcmp(pszStatus, "NEW") || !mir_strcmp(pszStatus, "PLACEHOLDER")) {
char *pszType = SkypeGetErr("FILETRANSFER", pszMsgNum, "TYPE");
if (pszType) {
- if (!strcmp(pszType, "INCOMING")) {
+ if (!mir_strcmp(pszType, "INCOMING")) {
char *pszFN = SkypeGetErr("FILETRANSFER", pszMsgNum, "FILENAME");
if (pszFN) {
cbNewSize = cbMsg + mir_strlen(pszFN) + 2;
@@ -284,15 +284,15 @@ void FXHandleMessageThread(ft_args *pargs) }
if (pargs->bStatus) {
- if (!strcmp(pargs->szArg, "CONNECTING"))
+ if (!mir_strcmp(pargs->szArg, "CONNECTING"))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)dwChat, 0);
else if (!strncmp(pargs->szArg, "TRANSFERRING", 12))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dwChat, 0);
- else if (!strcmp(pargs->szArg, "FAILED"))
+ else if (!mir_strcmp(pargs->szArg, "FAILED"))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)dwChat, 0);
- else if (!strcmp(pargs->szArg, "CANCELLED"))
+ else if (!mir_strcmp(pargs->szArg, "CANCELLED"))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)dwChat, 0);
- else if (!strcmp(pargs->szArg, "COMPLETED")) {
+ else if (!mir_strcmp(pargs->szArg, "COMPLETED")) {
// Check if all transfers from this message are completed.
char *pszMsgNum, *pszStatus;
BOOL bAllComplete = TRUE;
@@ -300,7 +300,7 @@ void FXHandleMessageThread(ft_args *pargs) if (pszXferIDs) {
for (pszMsgNum = strtok(pszXferIDs, ", "); pszMsgNum; pszMsgNum = strtok(NULL, ", ")) {
if (pszStatus = SkypeGetErrID("FILETRANSFER", pszMsgNum, "STATUS")) {
- if (strcmp(pszStatus, "COMPLETED")) bAllComplete = FALSE;
+ if (mir_strcmp(pszStatus, "COMPLETED")) bAllComplete = FALSE;
free(pszStatus);
if (!bAllComplete) break;
}
@@ -324,7 +324,7 @@ void FXHandleMessageThread(ft_args *pargs) if (pszXferIDs) {
for (pszMsgNum = strtok(pszXferIDs, ", "), i = 0; pszMsgNum; pszMsgNum = strtok(NULL, ", "), i++) {
DWORD dwTransferred;
- BOOL bIsCurFil = strcmp(pargs->szNum, pszMsgNum) == 0;
+ BOOL bIsCurFil = mir_strcmp(pargs->szNum, pszMsgNum) == 0;
if (bIsCurFil)
pfts.currentFileNumber = i;
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp index 55865b0c2a..e59785a5e3 100644 --- a/protocols/SkypeClassic/src/gchat.cpp +++ b/protocols/SkypeClassic/src/gchat.cpp @@ -184,7 +184,7 @@ MCONTACT find_chatA(char *chatname) { { DBVARIANT dbv; if (!db_get_s(hContact, SKYPE_PROTONAME, "ChatRoomID", &dbv)) { - int tCompareResult = strcmp(dbv.pszVal, chatname); + int tCompareResult = mir_strcmp(dbv.pszVal, chatname); db_free(&dbv); if (!tCompareResult) return hContact; // already there, return handle @@ -225,7 +225,7 @@ int __cdecl AddMembers(char *szSkypeMsg) { break; } if (!(who = SkypeGet ("CHATMEMBER", token, "IDENTITY"))) continue; - if (strcmp(who, dbv2.pszVal)) { + if (mir_strcmp(who, dbv2.pszVal)) { TCHAR *ptszRole = NULL; char *pszRole = SkypeGet("CHATMEMBER", token, "ROLE"); @@ -256,7 +256,7 @@ int __cdecl AddMembers(char *szSkypeMsg) { iRet = -1; break; } - if (strcmp(who, dbv2.pszVal)) { + if (mir_strcmp(who, dbv2.pszVal)) { i=AddChatContact(gc, who, NULL); BYTE *pcontactmask; if (i<0 || !(pcontactmask= (BYTE *) realloc(contactmask, gc->mJoinedCount))) { diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index 7a28811213..4204b25ece 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -255,7 +255,7 @@ int ShowMessageA(int iconID, char *lpzText, int mustShow) { int HookContactAdded(WPARAM wParam, LPARAM) {
MCONTACT hContact = (MCONTACT) wParam;
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME))
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME))
add_contextmenu(hContact);
return 0;
}
@@ -263,7 +263,7 @@ int HookContactAdded(WPARAM wParam, LPARAM) { int HookContactDeleted(WPARAM wParam, LPARAM) {
MCONTACT hContact = (MCONTACT) wParam;
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME)) {
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME)) {
DBVARIANT dbv;
if (db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 1;
int retval = SkypeSend("SET USER %s BUDDYSTATUS 1", dbv.pszVal);
@@ -582,7 +582,7 @@ void __cdecl SearchRecentChats(void *) { char *pszStatus = SkypeGet("CHAT", token, "STATUS");
if (pszStatus) {
- if (!strcmp(pszStatus, "MULTI_SUBSCRIBED")) {
+ if (!mir_strcmp(pszStatus, "MULTI_SUBSCRIBED")) {
// Add chatrooms for active multisubscribed chats
/*if (!find_chatA(token)) */
EnterCriticalSection(&QueryThreadMutex);
@@ -914,26 +914,26 @@ void FetchMessageThread(fetchmsg_arg *pargs) { // Get chat status
if ((status = SkypeGetErr("CHAT", chat, "STATUS")) &&
- !strcmp(status, "MULTI_SUBSCRIBED")) isGroupChat = TRUE;
+ !mir_strcmp(status, "MULTI_SUBSCRIBED")) isGroupChat = TRUE;
// Get chat type
if (!(type = SkypeGetErr(cmdMessage, args.msgnum, "TYPE"))) __leave;
- bEmoted = strcmp(type, "EMOTED") == 0;
- if (strcmp(type, "MULTI_SUBSCRIBED") == 0) isGroupChat = TRUE;
+ bEmoted = mir_strcmp(type, "EMOTED") == 0;
+ if (mir_strcmp(type, "MULTI_SUBSCRIBED") == 0) isGroupChat = TRUE;
// Group chat handling
- if (isGroupChat && strcmp(type, "TEXT") && strcmp(type, "SAID") && strcmp(type, "UNKNOWN") && !bEmoted) {
+ if (isGroupChat && mir_strcmp(type, "TEXT") && mir_strcmp(type, "SAID") && mir_strcmp(type, "UNKNOWN") && !bEmoted) {
if (bUseGroupChat) {
BOOL bAddedMembers = FALSE;
- if (!strcmp(type, "SAWMEMBERS") || !strcmp(type, "CREATEDCHATWITH"))
+ if (!mir_strcmp(type, "SAWMEMBERS") || !mir_strcmp(type, "CREATEDCHATWITH"))
{
// We have a new Groupchat
LOG(("FetchMessageThread CHAT SAWMEMBERS"));
if (!hChat) ChatStart(chat, FALSE);
__leave;
}
- if (!strcmp(type, "KICKED"))
+ if (!mir_strcmp(type, "KICKED"))
{
if (!hChat) __leave;
GCDEST gcd = { SKYPE_PROTONAME, make_nonutf_tchar_string((const unsigned char*)chat), GC_EVENT_KICK };
@@ -963,7 +963,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { free_nonutf_tchar_string((void*)gcd.ptszID);
__leave;
}
- if (!strcmp(type, "SETROLE"))
+ if (!mir_strcmp(type, "SETROLE"))
{
gchat_contact *gcContact;
char *pszRole;
@@ -1016,7 +1016,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { free_nonutf_tchar_string((void*)gcd.ptszID);
__leave;
}
- if (!strcmp(type, "SETTOPIC"))
+ if (!mir_strcmp(type, "SETTOPIC"))
{
LOG(("FetchMessageThread CHAT SETTOPIC"));
GCDEST gcd = { SKYPE_PROTONAME, make_nonutf_tchar_string((const unsigned char*)chat), GC_EVENT_TOPIC };
@@ -1050,7 +1050,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { }
__leave;
}
- if (!strcmp(type, "LEFT") || (bAddedMembers = strcmp(type, "ADDEDMEMBERS") == 0))
+ if (!mir_strcmp(type, "LEFT") || (bAddedMembers = mir_strcmp(type, "ADDEDMEMBERS") == 0))
{
LOG(("FetchMessageThread CHAT LEFT or ADDEDMEMBERS"));
if (bAddedMembers) {
@@ -1064,7 +1064,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { if (who = SkypeGetErr(cmdMessage, args.msgnum, szPartnerHandle)) {
DBVARIANT dbv;
if (db_get_s(NULL, SKYPE_PROTONAME, SKYPE_NAME, &dbv) == 0) {
- gce.bIsMe = strcmp(who, dbv.pszVal) == 0;
+ gce.bIsMe = mir_strcmp(who, dbv.pszVal) == 0;
db_free(&dbv);
}
gce.ptszUID = make_nonutf_tchar_string((const unsigned char*)who);
@@ -1103,7 +1103,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { status = SkypeGetID(cmdMessage, args.msgnum, "STATUS");
if (protocol < 4) InterlockedDecrement(&rcvwatchers);
if (!status) __leave;
- if (!strcmp(status, "SENT")) direction = DBEF_SENT;
+ if (!mir_strcmp(status, "SENT")) direction = DBEF_SENT;
free(status);
}
@@ -1113,7 +1113,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { // Get contact handle
LOG(("FetchMessageThread Finding contact handle"));
db_get_s(NULL, SKYPE_PROTONAME, SKYPE_NAME, &dbv);
- if (dbv.pszVal && !strcmp(who, dbv.pszVal))
+ if (dbv.pszVal && !mir_strcmp(who, dbv.pszVal))
{
// It's from me.. But to whom?
// CHATMESSAGE .. USERS doesn't return anything, so we have to query the CHAT-Object
@@ -1124,7 +1124,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { char *pTok, *nextoken = 0;
for (pTok = strtok_r(ptr, " ", &nextoken); pTok; pTok = strtok_r(NULL, " ", &nextoken)) {
- if (strcmp(pTok, dbv.pszVal)) break; // Take the first dude in the list who is not me
+ if (mir_strcmp(pTok, dbv.pszVal)) break; // Take the first dude in the list who is not me
}
if (!pTok) {
@@ -1150,7 +1150,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { }
}
- if (strcmp(type, "FILETRANSFER") == 0)
+ if (mir_strcmp(type, "FILETRANSFER") == 0)
{
// Our custom Skypekit FILETRANSFER extension
bHasFileXfer = TRUE;
@@ -1376,7 +1376,7 @@ void FetchMessageThreadSync(fetchmsg_arg *pargs) { static int MsglCmpProc(const void *pstPElement, const void *pstPToFind)
{
- return strcmp((char*)((fetchmsg_arg*)pstPElement)->pMsgEntry, (char*)((fetchmsg_arg*)pstPToFind)->pMsgEntry);
+ return mir_strcmp((char*)((fetchmsg_arg*)pstPElement)->pMsgEntry, (char*)((fetchmsg_arg*)pstPToFind)->pMsgEntry);
}
void MessageListProcessingThread(char *str) {
@@ -1432,7 +1432,7 @@ MCONTACT GetCallerContact(char *szSkypeMsg) for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (db_get_s(hContact, SKYPE_PROTONAME, "SkypeOutNr", &dbv)) continue;
- tCompareResult = strcmp(dbv.pszVal, szHandle);
+ tCompareResult = mir_strcmp(dbv.pszVal, szHandle);
db_free(&dbv);
if (tCompareResult) continue; else break;
}
@@ -1446,7 +1446,7 @@ MCONTACT GetMetaHandle(DWORD dwId) {
for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, "MetaContacts") &&
+ if (szProto != NULL && !mir_strcmp(szProto, "MetaContacts") &&
db_get_dw(hContact, "MetaContacts", "MetaID", MAXDWORD) == dwId)
return hContact;
}
@@ -1621,7 +1621,7 @@ void EndCallThread(char *szSkypeMsg) { if (szSkypeMsg) {
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (db_get_s(hContact, SKYPE_PROTONAME, "CallId", &dbv)) continue;
- int tCompareResult = strcmp(dbv.pszVal, szSkypeMsg);
+ int tCompareResult = mir_strcmp(dbv.pszVal, szSkypeMsg);
db_free(&dbv);
if (!tCompareResult)
break;
@@ -1646,7 +1646,7 @@ void EndCallThread(char *szSkypeMsg) { if (!db_get_s(hContact, SKYPE_PROTONAME, "SkypeOutNr", &dbv)) {
db_free(&dbv);
- if (!strcmp((char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0), SKYPE_PROTONAME) &&
+ if (!mir_strcmp((char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0), SKYPE_PROTONAME) &&
db_get_b(hContact, "CList", "NotOnList", 0)
)
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
@@ -1797,7 +1797,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) if (p = strtok_r(szSkypeMsg + 29, " ", &nextoken))
{
- if (!strcmp(p, "STREAMS")) {
+ if (!mir_strcmp(p, "STREAMS")) {
char *pStr;
while (p = strtok_r(NULL, " ", &nextoken)) {
@@ -1810,7 +1810,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) }
}
}
- else if (!strcmp(p, "DATAGRAM")) {
+ else if (!mir_strcmp(p, "DATAGRAM")) {
if (p = strtok_r(NULL, " ", &nextoken)) {
char *pStr;
@@ -1823,7 +1823,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) if (p = strtok_r(NULL, " ", &nextoken)) {
LPARAM lTyping = PROTOTYPE_CONTACTTYPING_OFF;
- if (!strcmp(p, "PURPLE_TYPING")) lTyping = PROTOTYPE_CONTACTTYPING_INFINITE;
+ if (!mir_strcmp(p, "PURPLE_TYPING")) lTyping = PROTOTYPE_CONTACTTYPING_INFINITE;
CallService(MS_PROTO_CONTACTISTYPING, hContact, lTyping);
break;
}
@@ -1839,20 +1839,20 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) buf = _strdup(szSkypeMsg + 5);
if ((nick = strtok_r(buf, " ", &nextoken)) && (ptr = strtok_r(NULL, " ", &nextoken)))
{
- if (strcmp(ptr, "BUDDYSTATUS")) {
- if (!strcmp(ptr, "RECEIVEDAUTHREQUEST")) {
+ if (mir_strcmp(ptr, "BUDDYSTATUS")) {
+ if (!mir_strcmp(ptr, "RECEIVEDAUTHREQUEST")) {
pthread_create((pThreadFunc)ProcessAuthRq, strdup(szSkypeMsg));
free(buf);
break;
}
- if (!(hContact = find_contact(nick)) && strcmp(ptr, "FULLNAME")) {
+ if (!(hContact = find_contact(nick)) && mir_strcmp(ptr, "FULLNAME")) {
SkypeSend("GET USER %s BUDDYSTATUS", nick);
free(buf);
break;
}
- if (!strcmp(ptr, "ONLINESTATUS")) {
+ if (!mir_strcmp(ptr, "ONLINESTATUS")) {
if (SkypeStatus != ID_STATUS_OFFLINE)
{
db_set_w(hContact, SKYPE_PROTONAME, "Status", (WORD)SkypeStatusToMiranda(ptr + 13));
@@ -1882,7 +1882,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) * This may not be the most efficient way, but ensures that we finally do proper
* error handling.
*/
- if (!strcmp(ptr, "FULLNAME")) {
+ if (!mir_strcmp(ptr, "FULLNAME")) {
char *nm = strtok_r(NULL, " ", &nextoken);
if (nm)
@@ -1894,7 +1894,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) db_set_utf(hContact, SKYPE_PROTONAME, "LastName", nm);
}
}
- else if (!strcmp(ptr, "BIRTHDAY")) {
+ else if (!mir_strcmp(ptr, "BIRTHDAY")) {
int y, m, d;
if (sscanf(ptr + 9, "%04d%02d%02d", &y, &m, &d) == 3) {
db_set_w(hContact, SKYPE_PROTONAME, "BirthYear", (WORD)y);
@@ -1907,7 +1907,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) db_unset(hContact, SKYPE_PROTONAME, "BirthDay");
}
}
- else if (!strcmp(ptr, "COUNTRY")) {
+ else if (!mir_strcmp(ptr, "COUNTRY")) {
if (ptr[8]) {
struct CountryListEntry *countries;
int countryCount;
@@ -1923,7 +1923,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) }
else db_unset(hContact, SKYPE_PROTONAME, "Country");
}
- else if (!strcmp(ptr, "SEX")) {
+ else if (!mir_strcmp(ptr, "SEX")) {
if (ptr[4]) {
BYTE sex = 0;
if (!_stricmp(ptr + 4, "MALE")) sex = 0x4D;
@@ -1932,11 +1932,11 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) }
else db_unset(hContact, SKYPE_PROTONAME, "Gender");
}
- else if (!strcmp(ptr, "MOOD_TEXT")) {
+ else if (!mir_strcmp(ptr, "MOOD_TEXT")) {
LOG(("WndProc MOOD_TEXT"));
db_set_utf(hContact, "CList", "StatusMsg", ptr + 10);
}
- else if (!strcmp(ptr, "TIMEZONE")){
+ else if (!mir_strcmp(ptr, "TIMEZONE")){
time_t temp;
struct tm tms;
int value = atoi(ptr + 9), tz;
@@ -1965,22 +1965,22 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) db_unset(hContact, "UserInfo", "Timezone");
}
}
- else if (!strcmp(ptr, "IS_VIDEO_CAPABLE")){
+ else if (!mir_strcmp(ptr, "IS_VIDEO_CAPABLE")){
if (!_stricmp(ptr + 17, "True"))
db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 2.0");
else
db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype");
}
- else if (!strcmp(ptr, "ISBLOCKED")){
+ else if (!mir_strcmp(ptr, "ISBLOCKED")){
if (!_stricmp(ptr + 10, "True"))
db_set_b(hContact, SKYPE_PROTONAME, "IsBlocked", 1);
else
db_unset(hContact, SKYPE_PROTONAME, "IsBlocked");
}
- else if (!strcmp(ptr, "RICH_MOOD_TEXT")) {
+ else if (!mir_strcmp(ptr, "RICH_MOOD_TEXT")) {
db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 3.0");
}
- else if (!strcmp(ptr, "DISPLAYNAME")) {
+ else if (!mir_strcmp(ptr, "DISPLAYNAME")) {
// Skype Bug? -> If nickname isn't customised in the Skype-App, this won't return anything :-(
if (ptr[12])
db_set_utf(hContact, SKYPE_PROTONAME, "Nick", ptr + 12);
@@ -1989,7 +1989,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) {
// Other proerties that can be directly assigned to a DB-Value
for (int i = 0; i < sizeof(m_settings) / sizeof(m_settings[0]); i++) {
- if (!strcmp(ptr, m_settings[i].SkypeSetting)) {
+ if (!mir_strcmp(ptr, m_settings[i].SkypeSetting)) {
char *pszProp = ptr + mir_strlen(m_settings[i].SkypeSetting) + 1;
if (*pszProp)
db_set_utf(hContact, SKYPE_PROTONAME, m_settings[i].MirandaSetting, pszProp);
@@ -2086,14 +2086,14 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) // context menu
if (ptr = strstr(szSkypeMsg, " STATUS ")) {
ptr[0] = 0; ptr += 8;
- if (!strcmp(ptr, "RINGING") || !strcmp(ptr, "ROUTING")) pthread_create((pThreadFunc)RingThread, _strdup(szSkypeMsg));
- if (!strcmp(ptr, "FAILED") || !strcmp(ptr, "FINISHED") ||
- !strcmp(ptr, "MISSED") || !strcmp(ptr, "REFUSED") ||
- !strcmp(ptr, "BUSY") || !strcmp(ptr, "CANCELLED"))
+ if (!mir_strcmp(ptr, "RINGING") || !mir_strcmp(ptr, "ROUTING")) pthread_create((pThreadFunc)RingThread, _strdup(szSkypeMsg));
+ if (!mir_strcmp(ptr, "FAILED") || !mir_strcmp(ptr, "FINISHED") ||
+ !mir_strcmp(ptr, "MISSED") || !mir_strcmp(ptr, "REFUSED") ||
+ !mir_strcmp(ptr, "BUSY") || !mir_strcmp(ptr, "CANCELLED"))
pthread_create((pThreadFunc)EndCallThread, _strdup(szSkypeMsg));
- if (!strcmp(ptr, "ONHOLD") || !strcmp(ptr, "LOCALHOLD") ||
- !strcmp(ptr, "REMOTEHOLD")) pthread_create((pThreadFunc)HoldCallThread, _strdup(szSkypeMsg));
- if (!strcmp(ptr, "INPROGRESS")) pthread_create((pThreadFunc)ResumeCallThread, _strdup(szSkypeMsg));
+ if (!mir_strcmp(ptr, "ONHOLD") || !mir_strcmp(ptr, "LOCALHOLD") ||
+ !mir_strcmp(ptr, "REMOTEHOLD")) pthread_create((pThreadFunc)HoldCallThread, _strdup(szSkypeMsg));
+ if (!mir_strcmp(ptr, "INPROGRESS")) pthread_create((pThreadFunc)ResumeCallThread, _strdup(szSkypeMsg));
break;
}
else if ((!strstr(szSkypeMsg, "PARTNER_HANDLE") && !strstr(szSkypeMsg, "FROM_HANDLE"))
@@ -2625,7 +2625,7 @@ static INT_PTR EventAddHook(WPARAM wParam, LPARAM lParam) MCONTACT hContact = (MCONTACT)wParam;
DBEVENTINFO *dbei=(DBEVENTINFO*)lParam;
if (dbei && hContact == m_AddEventArg.hContact && dbei->eventType==EVENTTYPE_MESSAGE && (dbei->flags & DBEF_SENT) &&
- strcmp(dbei->szModule, SKYPE_PROTONAME) == 0) {
+ mir_strcmp(dbei->szModule, SKYPE_PROTONAME) == 0) {
dbei->timestamp = m_AddEventArg.timestamp;
}
return 0;
@@ -2830,7 +2830,7 @@ char *__skypeauth(WPARAM wParam) { return NULL;
}
- if (db_event_get(wParam, &dbei) || dbei.eventType != EVENTTYPE_AUTHREQUEST || strcmp(dbei.szModule, SKYPE_PROTONAME))
+ if (db_event_get(wParam, &dbei) || dbei.eventType != EVENTTYPE_AUTHREQUEST || mir_strcmp(dbei.szModule, SKYPE_PROTONAME))
{
free(dbei.pBlob);
return NULL;
@@ -2983,7 +2983,7 @@ int AnySkypeusers(void) // GETCONTACTBASEPROTO doesn't work on not loaded protocol, therefore get
// protocol from DB
if (db_get_s(hContact, "Protocol", "p", &dbv)) continue;
- tCompareResult = !strcmp(dbv.pszVal, SKYPE_PROTONAME);
+ tCompareResult = !mir_strcmp(dbv.pszVal, SKYPE_PROTONAME);
db_free(&dbv);
if (tCompareResult) return 1;
}
@@ -3030,7 +3030,7 @@ free(pdi.szSettings); }
// Upgrade Protocol assignment, if we are not main contact
if (hContact && !db_get_s(hContact, "Protocol", "p", &dbv)) {
-if (!strcmp(dbv.pszVal, OldName))
+if (!mir_strcmp(dbv.pszVal, OldName))
db_set_s(hContact, "Protocol", "p", SKYPE_PROTONAME);
db_free(&dbv);
}
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp index 35b4117560..5c464bae39 100644 --- a/protocols/SkypeClassic/src/skypeapi.cpp +++ b/protocols/SkypeClassic/src/skypeapi.cpp @@ -353,7 +353,7 @@ static int __sendMsg(char *szMsg) { LOG(("> %s", szMsg));
// Fake PING-PONG, as PING-PONG is not supported by Skype2Socket
- if ((UseSockets || bIsImoproxy) && !strcmp(szMsg, "PING")) {
+ if ((UseSockets || bIsImoproxy) && !mir_strcmp(szMsg, "PING")) {
CopyData.dwData=0;
CopyData.lpData="PONG";
CopyData.cbData=5;
@@ -536,7 +536,7 @@ char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait) pMsg++;
if (strncmp (pMsg, "STATUS ", 7) == 0) {
pMsg+=7;
- if (strcmp (pMsg, "SENDING") == 0) {
+ if (mir_strcmp (pMsg, "SENDING") == 0) {
// Remove dat shit
struct MsgQueue *ptr_=ptr->l.tqe_next;
@@ -544,9 +544,9 @@ char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait) ptr=ptr_;
continue;
}
- bProcess = (strcmp (pMsg, "SENT") == 0 || strcmp (pMsg, "QUEUED") == 0 ||
- strcmp (pMsg, "FAILED") == 0 || strcmp (pMsg, "IGNORED") == 0 ||
- strcmp (pMsg, "SENDING") == 0);
+ bProcess = (mir_strcmp (pMsg, "SENT") == 0 || mir_strcmp (pMsg, "QUEUED") == 0 ||
+ mir_strcmp (pMsg, "FAILED") == 0 || mir_strcmp (pMsg, "IGNORED") == 0 ||
+ mir_strcmp (pMsg, "SENDING") == 0);
}
}
}
@@ -907,7 +907,7 @@ static INT_PTR CALLBACK CallstatDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, // Check, if another call is in progress
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME) && hContact != (MCONTACT)lParam &&
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME) && hContact != (MCONTACT)lParam &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0 &&
!db_get_s(hContact, SKYPE_PROTONAME, "CallId", &dbv2))
{
@@ -1319,10 +1319,10 @@ void SkypeFlush(void) { * 0 - Nothing found
*/
int SkypeStatusToMiranda(char *s) {
- if (!strcmp("SKYPEOUT", s))
+ if (!mir_strcmp("SKYPEOUT", s))
return db_get_dw(NULL, SKYPE_PROTONAME, "SkypeOutStatusMode", ID_STATUS_ONTHEPHONE);
for(int i=0; status_codes[i].szStat; i++)
- if (!strcmp(status_codes[i].szStat, s))
+ if (!mir_strcmp(status_codes[i].szStat, s))
return status_codes[i].id;
return 0;
}
@@ -1583,7 +1583,7 @@ static int _ConnectToSkypeAPI(char *path, int iStart) { return -1;
}
- if (strcmp (ptr+11, "CONNECTING"))
+ if (mir_strcmp (ptr+11, "CONNECTING"))
{
free (ptr);
break;
diff --git a/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c b/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c index fe3b88e363..65ba2e0ccc 100644 --- a/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c +++ b/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c @@ -299,7 +299,7 @@ void SkypeSend(char *szMsg) { LOG(("SkypeSend: DAMN! No Skype window handle! :("));
return;
}
- if (strcmp(szMsg, "PING")) {LOG(("> %s", szMsg));}
+ if (mir_strcmp(szMsg, "PING")) {LOG(("> %s", szMsg));}
CopyData.dwData=0;
CopyData.lpData=szMsg;
CopyData.cbData=strlen(szMsg)+1;
@@ -379,7 +379,7 @@ void ServerThread(char *dummy) { switch (command) {
#ifdef USE_AUTHENTICATION
case 0x01: // Compare hash
- if (password && !strcmp(password, buf)) Authenticated=TRUE;
+ if (password && !mir_strcmp(password, buf)) Authenticated=TRUE;
else Authenticated=FALSE;
if (Authenticated) {
OUTPUT("User authenticated succesfully.");
@@ -439,12 +439,12 @@ LONG APIENTRY WndProc(HWND hWnd, UINT message, UINT wParam, LONG lParam) CopyData=(PCOPYDATASTRUCT)lParam;
szSkypeMsg=strdup(CopyData->lpData);
ReplyMessage(1);
- if (!strcmp(szSkypeMsg, "PONG")) {
+ if (!mir_strcmp(szSkypeMsg, "PONG")) {
WatchDog=1;
break;
} // Hide PING-PONG
LOG(("< %s", szSkypeMsg));
- if (!strcmp(szSkypeMsg, "USERSTATUS LOGGEDOUT")) {
+ if (!mir_strcmp(szSkypeMsg, "USERSTATUS LOGGEDOUT")) {
OUTPUT("Skype shut down gracefully. I'll leave too, bye.. :)");
bail_out(1);
}
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 4dc1047e83..3db8101cf8 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -148,7 +148,7 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam) {
return 1;
}
- else if (strcmp(gch->pDest->pszModule, m_szModuleName) != 0)
+ else if (mir_strcmp(gch->pDest->pszModule, m_szModuleName) != 0)
{
return 0;
}
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 0a33ee44e8..42366808d4 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -67,7 +67,7 @@ MCONTACT CSkypeProto::GetContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return INVALID_CONTACT_ID;
- if (strcmp(dbei.szModule, m_szModuleName) != 0)
+ if (mir_strcmp(dbei.szModule, m_szModuleName) != 0)
return INVALID_CONTACT_ID;
return DbGetAuthEventContact(&dbei);
}
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 266e522395..fde3788e65 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -116,7 +116,7 @@ MCONTACT CSkypeProto::AddToListByEvent(int, int, MEVENT hDbEvent) return NULL;
if (db_event_get(hDbEvent, &dbei))
return NULL;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return NULL;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return NULL;
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 313e765b41..5749916f27 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -72,7 +72,7 @@ MCONTACT CSteamProto::GetContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return INVALID_CONTACT_ID; - if (strcmp(dbei.szModule, m_szModuleName) != 0) + if (mir_strcmp(dbei.szModule, m_szModuleName) != 0) return INVALID_CONTACT_ID; return DbGetAuthEventContact(&dbei); diff --git a/protocols/Steam/src/steam_instances.cpp b/protocols/Steam/src/steam_instances.cpp index c2113d3c6c..edd1eaef7f 100644 --- a/protocols/Steam/src/steam_instances.cpp +++ b/protocols/Steam/src/steam_instances.cpp @@ -38,7 +38,7 @@ CSteamProto* CSteamProto::GetContactProtoInstance(MCONTACT hContact) return NULL;
for (int i = 0; i < InstanceList.getCount(); i++)
- if (!strcmp(proto, InstanceList[i]->m_szModuleName))
+ if (!mir_strcmp(proto, InstanceList[i]->m_szModuleName))
return InstanceList[i];
return NULL;
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index bfa27646e0..2137bf8c58 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -141,7 +141,7 @@ int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_IT } if (md5 != NULL) { /* check contact's avatar hash - md5 */ - if (oldHash == NULL || strcmp(oldHash, md5)) { + if (oldHash == NULL || mir_strcmp(oldHash, md5)) { if (item != NULL) { item->newAvatarDownloading = TRUE; } diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp index 9d05fef08f..105f3785f1 100644 --- a/protocols/Tlen/src/tlen_file.cpp +++ b/protocols/Tlen/src/tlen_file.cpp @@ -552,7 +552,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) int numFiles;
TLEN_LIST_ITEM *item;
-// if (!node->name || strcmp(node->name, "f")) return;
+// if (!node->name || mir_strcmp(node->name, "f")) return;
if (info == NULL) return;
char *from=TlenXmlGetAttrValue(node, "f");
@@ -564,7 +564,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
char *e=TlenXmlGetAttrValue(node, "e");
if (e != NULL) {
- if (!strcmp(e, "1")) {
+ if (!mir_strcmp(e, "1")) {
// FILE_RECV : e='1' : File transfer request
TLEN_FILE_TRANSFER *ft = TlenFileCreateFT(info->proto, jid);
ft->hContact = TlenHContactFromJID(info->proto, jid);
@@ -610,7 +610,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) TlenP2PFreeFileTransfer(ft);
}
}
- else if (!strcmp(e, "3")) {
+ else if (!mir_strcmp(e, "3")) {
// FILE_RECV : e='3' : invalid transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
@@ -622,27 +622,27 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "4")) {
+ else if (!mir_strcmp(e, "4")) {
// FILE_SEND : e='4' : File sending request was denied by the remote client
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
- if (!strcmp(item->ft->jid, jid)) {
+ if (!mir_strcmp(item->ft->jid, jid)) {
ProtoBroadcastAck(info->proto->m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, item->ft, 0);
TlenListRemove(info->proto, LIST_FILE, p);
}
}
}
}
- else if (!strcmp(e, "5")) {
+ else if (!mir_strcmp(e, "5")) {
// FILE_SEND : e='5' : File sending request was accepted
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
- if (!strcmp(item->ft->jid, jid))
+ if (!mir_strcmp(item->ft->jid, jid))
forkthread((void (__cdecl *)(void*))TlenFileSendingThread, 0, item->ft);
}
}
}
- else if (!strcmp(e, "6")) {
+ else if (!mir_strcmp(e, "6")) {
// FILE_RECV : e='6' : IP and port information to connect to get file
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
@@ -656,7 +656,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "7")) {
+ else if (!mir_strcmp(e, "7")) {
// FILE_RECV : e='7' : IP and port information to connect to send file
// in case the conection to the given server was not successful
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
@@ -673,7 +673,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "8")) {
+ else if (!mir_strcmp(e, "8")) {
// FILE_RECV : e='8' : transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 837a24d81b..e0b831b98e 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -35,7 +35,7 @@ void TlenIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) if (type == NULL)
return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
DBVARIANT dbv;
if (db_get(NULL, proto->m_szModuleName, "Nick", &dbv))
@@ -50,7 +50,7 @@ void TlenIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) TlenSend(proto, "<iq to='tcfg' type='get' id='TcfgGetAfterLoggedIn'></iq>");
}
// What to do if password error? etc...
- else if (!strcmp(type, "error")) {
+ else if (!mir_strcmp(type, "error")) {
char text[128];
TlenSend(proto, "</s>");
@@ -69,13 +69,13 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { for (int i=0; i<queryNode->numChild; i++) {
XmlNode *itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
char *jid=TlenXmlGetAttrValue(itemNode, "jid");
if (jid != NULL) {
char *str = TlenXmlGetAttrValue(itemNode, "subscription");
if (str == NULL)
continue;
- else if (!strcmp(str, "remove")) {
+ else if (!mir_strcmp(str, "remove")) {
if ((hContact = TlenHContactFromJID(proto, jid)) != NULL) {
if (db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
@@ -84,11 +84,11 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { } else {
TLEN_LIST_ITEM *item = TlenListAdd(proto, LIST_ROSTER, jid);
if (item != NULL) {
- if (!strcmp(str, "both"))
+ if (!mir_strcmp(str, "both"))
item->subscription = SUB_BOTH;
- else if (!strcmp(str, "to"))
+ else if (!mir_strcmp(str, "to"))
item->subscription = SUB_TO;
- else if (!strcmp(str, "from"))
+ else if (!mir_strcmp(str, "from"))
item->subscription = SUB_FROM;
else
item->subscription = SUB_NONE;
@@ -113,7 +113,7 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { Clist_CreateGroup(0, _A2T(item->group));
// Don't set group again if already correct, or Miranda may show wrong group count in some case
if (!db_get(hContact, "CList", "Group", &dbv)) {
- if (strcmp(dbv.pszVal, item->group))
+ if (mir_strcmp(dbv.pszVal, item->group))
db_set_s(hContact, "CList", "Group", item->group);
db_free(&dbv);
} else
@@ -139,9 +139,9 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) XmlNode *queryNode=TlenXmlGetChild(iqNode, "query");
if (queryNode == NULL) return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
char *str = TlenXmlGetAttrValue(queryNode, "xmlns");
- if (str != NULL && !strcmp(str, "jabber:iq:roster")) {
+ if (str != NULL && !mir_strcmp(str, "jabber:iq:roster")) {
DBVARIANT dbv;
XmlNode *itemNode, *groupNode;
TLEN_SUBSCRIPTION sub;
@@ -151,14 +151,14 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
str = TlenXmlGetAttrValue(itemNode, "subscription");
if (str == NULL) sub = SUB_NONE;
- else if (!strcmp(str, "both")) sub = SUB_BOTH;
- else if (!strcmp(str, "to")) sub = SUB_TO;
- else if (!strcmp(str, "from")) sub = SUB_FROM;
+ else if (!mir_strcmp(str, "both")) sub = SUB_BOTH;
+ else if (!mir_strcmp(str, "to")) sub = SUB_TO;
+ else if (!mir_strcmp(str, "from")) sub = SUB_FROM;
else sub = SUB_NONE;
- //if (str != NULL && (!strcmp(str, "to") || !strcmp(str, "both"))) {
+ //if (str != NULL && (!mir_strcmp(str, "to") || !mir_strcmp(str, "both"))) {
if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if ((name=TlenXmlGetAttrValue(itemNode, "name")) != NULL)
nick = TlenTextDecode(name);
@@ -183,7 +183,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) Clist_CreateGroup(0, _A2T(item->group));
// Don't set group again if already correct, or Miranda may show wrong group count in some case
if (!db_get(hContact, "CList", "Group", &dbv)) {
- if (strcmp(dbv.pszVal, item->group))
+ if (mir_strcmp(dbv.pszVal, item->group))
db_set_s(hContact, "CList", "Group", item->group);
db_free(&dbv);
}
@@ -247,7 +247,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) char *type=TlenXmlGetAttrValue(iqNode, "type");
if (type == NULL) return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
DBVARIANT dbv;
XmlNode *queryNode=TlenXmlGetChild(iqNode, "query");
@@ -265,7 +265,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) db_free(&dbv);
if ((hContact=TlenHContactFromJID(proto, text)) == NULL) {
if (db_get(NULL, proto->m_szModuleName, "LoginName", &dbv)) return;
- if (strcmp(dbv.pszVal, jid)) {
+ if (mir_strcmp(dbv.pszVal, jid)) {
db_free(&dbv);
return;
}
@@ -279,7 +279,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) for (int i=0; i<itemNode->numChild; i++) {
XmlNode *n = itemNode->child[i];
if (n == NULL || n->name == NULL) continue;
- if (!strcmp(n->name, "first")) {
+ if (!mir_strcmp(n->name, "first")) {
if (n->text != NULL) {
hasFirst = true;
nText = TlenTextDecode(n->text);
@@ -287,7 +287,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "last")) {
+ else if (!mir_strcmp(n->name, "last")) {
if (n->text != NULL) {
hasLast = true;
nText = TlenTextDecode(n->text);
@@ -295,7 +295,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "nick")) {
+ else if (!mir_strcmp(n->name, "nick")) {
if (n->text != NULL) {
hasNick = true;
nText = TlenTextDecode(n->text);
@@ -303,7 +303,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "email")) {
+ else if (!mir_strcmp(n->name, "email")) {
if (n->text != NULL) {
hasEmail = true;
nText = TlenTextDecode(n->text);
@@ -311,7 +311,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "c")) {
+ else if (!mir_strcmp(n->name, "c")) {
if (n->text != NULL) {
hasCity = true;
nText = TlenTextDecode(n->text);
@@ -319,20 +319,20 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "b")) {
+ else if (!mir_strcmp(n->name, "b")) {
if (n->text != NULL) {
WORD nAge = atoi(n->text);
hasAge = true;
db_set_w(hContact, proto->m_szModuleName, "Age", nAge);
}
}
- else if (!strcmp(n->name, "s")) {
+ else if (!mir_strcmp(n->name, "s")) {
if (n->text != NULL && n->text[1] == '\0' && (n->text[0] == '1' || n->text[0] == '2')) {
hasGender = true;
db_set_b(hContact, proto->m_szModuleName, "Gender", (BYTE) (n->text[0] == '1'?'M':'F'));
}
}
- else if (!strcmp(n->name, "e")) {
+ else if (!mir_strcmp(n->name, "e")) {
if (n->text != NULL) {
hasSchool = true;
nText = TlenTextDecode(n->text);
@@ -340,27 +340,27 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "j")) {
+ else if (!mir_strcmp(n->name, "j")) {
if (n->text != NULL) {
hasOccupation = true;
WORD nOccupation = atoi(n->text);
db_set_w(hContact, proto->m_szModuleName, "Occupation", nOccupation);
}
}
- else if (!strcmp(n->name, "r")) {
+ else if (!mir_strcmp(n->name, "r")) {
if (n->text != NULL) {
WORD nLookFor = atoi(n->text);
hasLookFor = true;
db_set_w(hContact, proto->m_szModuleName, "LookingFor", nLookFor);
}
}
- else if (!strcmp(n->name, "g")) { // voice chat enabled
+ else if (!mir_strcmp(n->name, "g")) { // voice chat enabled
if (n->text != NULL) {
BYTE bVoice = atoi(n->text);
db_set_w(hContact, proto->m_szModuleName, "VoiceChat", bVoice);
}
}
- else if (!strcmp(n->name, "v")) { // status visibility
+ else if (!mir_strcmp(n->name, "v")) { // status visibility
if (n->text != NULL) {
BYTE bPublic = atoi(n->text);
db_set_w(hContact, proto->m_szModuleName, "PublicStatus", bPublic);
@@ -409,14 +409,14 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) return;
int id = atoi(str+mir_strlen(TLEN_IQID));
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
jsr.hdr.cbSize = sizeof(TLEN_SEARCH_RESULT);
jsr.hdr.flags = PSR_TCHAR;
for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if (strchr(jid, '@') != NULL) {
strncpy_s(jsr.jid, jid, _TRUNCATE);
@@ -495,7 +495,7 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) if (!found) {
ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) id, 0);
}
- } else if (!strcmp(type, "error")) {
+ } else if (!mir_strcmp(type, "error")) {
// ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE) id, 0);
// There is no ACKRESULT_FAILED for ACKTYPE_SEARCH :) look at findadd.c
// So we will just send a SUCCESS
@@ -523,7 +523,7 @@ void TlenIqResultTcfg(TlenProtocol *proto, XmlNode *iqNode) char *type=TlenXmlGetAttrValue(iqNode, "type");
if (type == NULL) return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
if ((miniMailNode=TlenXmlGetChild(queryNode, "mini-mail")) == NULL) return;
if ((node=TlenXmlGetChild(miniMailNode, "base")) != NULL) {
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 9712af7339..07b59d5f47 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -39,9 +39,9 @@ static int isSelf(TlenProtocol *proto, const char *roomID, const char *nick) item = TlenListGetItemPtr(proto, LIST_CHATROOM, roomID);
if (item != NULL) {
if (item->nick == NULL) {
- if (!strcmp(nick, proto->threadData->username)) result = 1;
+ if (!mir_strcmp(nick, proto->threadData->username)) result = 1;
} else if (nick[0] == '~') {
- if (!strcmp(nick+1, item->nick)) {
+ if (!mir_strcmp(nick+1, item->nick)) {
result = 1;
}
}
@@ -72,7 +72,7 @@ static char *getDisplayName(TlenProtocol *proto, const char *id) if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, SIZEOF(jid), "%s@%s", id, dbv.pszVal);
db_free(&dbv);
- if (((hContact=TlenHContactFromJID(proto, jid)) != NULL) || !strcmp(id, proto->threadData->username)) {
+ if (((hContact=TlenHContactFromJID(proto, jid)) != NULL) || !mir_strcmp(id, proto->threadData->username)) {
CONTACTINFO ci = { sizeof(ci) };
ci.hContact = hContact;
ci.szProto = (char *)proto->m_szModuleName;
diff --git a/protocols/Tlen/src/tlen_p2p_new.cpp b/protocols/Tlen/src/tlen_p2p_new.cpp index 868b877313..5401396e96 100644 --- a/protocols/Tlen/src/tlen_p2p_new.cpp +++ b/protocols/Tlen/src/tlen_p2p_new.cpp @@ -243,7 +243,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { e = TlenXmlGetAttrValue(fs, "e");
id = TlenXmlGetAttrValue(fs, "i");
if (e != NULL) {
- if (!strcmp(e, "1")) {
+ if (!mir_strcmp(e, "1")) {
TLEN_FILE_TRANSFER * ft = (TLEN_FILE_TRANSFER *) mir_alloc(sizeof(TLEN_FILE_TRANSFER));
memset(ft, 0, sizeof(TLEN_FILE_TRANSFER));
char *c = TlenXmlGetAttrValue(fs, "c");
@@ -270,11 +270,11 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { ProtoChainRecvFile(ft->hContact, &pre);
mir_free(filenameT);
}
- } else if (!strcmp(e, "3")) {
+ } else if (!mir_strcmp(e, "3")) {
/* transfer error */
- } else if (!strcmp(e, "4")) {
+ } else if (!mir_strcmp(e, "4")) {
/* transfer denied */
- } else if (!strcmp(e, "5")) {
+ } else if (!mir_strcmp(e, "5")) {
/* transfer accepted */
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, id)) != NULL) {
item->id2 = mir_strdup("84273372");
@@ -290,7 +290,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { char *s = TlenXmlGetAttrValue(dcng, "s");
char *id2 = TlenXmlGetAttrValue(dcng, "i");
char *id = TlenXmlGetAttrValue(dcng, "mi");
- if (!strcmp(s, "1")) {
+ if (!mir_strcmp(s, "1")) {
/* Keys */
/* s - step */
/* i - id of the file */
@@ -301,7 +301,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { char *v = TlenXmlGetAttrValue(dcng, "v"); // v - ???
char *ck = TlenXmlGetAttrValue(dcng, "ck"); // ck - aes key
char *iv = TlenXmlGetAttrValue(dcng, "iv"); // iv - aes initial vector
- if (!strcmp(n, "file_send")) {
+ if (!mir_strcmp(n, "file_send")) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, id)) != NULL) {
item->id2 = mir_strdup(id2);
item->ft->id2 = mir_strdup(id2);
@@ -310,7 +310,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { item->ft->jid, item->ft->localName, item->ft->wLocalPort, item->ft->localName, item->ft->wLocalPort, item->ft->id2);
}
}
- } else if (!strcmp(s, "2")) {
+ } else if (!mir_strcmp(s, "2")) {
info->proto->debugLogA("step = 2");
info->proto->debugLogA("%s",from);
info->proto->debugLogA("%s",id2);
@@ -324,7 +324,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { forkthread((void (__cdecl *)(void*))TlenNewFileReceiveThread, 0, item->ft);
forkthread((void (__cdecl *)(void*))TlenNewFileSendThread, 0, item->ft);
}
- } else if (!strcmp(s, "4")) {
+ } else if (!mir_strcmp(s, "4")) {
/* IP and port */
if ((item=TlenListFindItemPtrById2(info->proto, LIST_FILE, id2)) != NULL) {
info->proto->debugLogA("step = 4");
diff --git a/protocols/Tlen/src/tlen_p2p_old.cpp b/protocols/Tlen/src/tlen_p2p_old.cpp index dee4b8831a..64edd27d0e 100644 --- a/protocols/Tlen/src/tlen_p2p_old.cpp +++ b/protocols/Tlen/src/tlen_p2p_old.cpp @@ -203,7 +203,7 @@ TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, HAND item = TlenListGetItemPtrFromIndex(proto, i);
if (item != NULL) {
mir_snprintf(str, SIZEOF(str), "%d", iqId);
- if (!strcmp(item->ft->iqId, str)) {
+ if (!mir_strcmp(item->ft->iqId, str)) {
char *hash, *nick;
int j;
nick = TlenNickFromJID(item->ft->jid);
diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp index cfda82403b..cc7163c13f 100644 --- a/protocols/Tlen/src/tlen_picture.cpp +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -188,7 +188,7 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) { item = TlenListGetItemPtr(proto, LIST_PICTURE, idt);
}
if (item != NULL) {
- if (!strcmp(from, "ps")) {
+ if (!mir_strcmp(from, "ps")) {
char *st = TlenXmlGetAttrValue(node, "st");
if (st != NULL) {
item->ft->iqId = mir_strdup(st);
@@ -198,12 +198,12 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) { item->ft->hFileEvent = NULL;
}
}
- } else if (!strcmp(item->ft->jid, fromRaw)) {
+ } else if (!mir_strcmp(item->ft->jid, fromRaw)) {
if (crc_c != NULL) {
- if (!strcmp(crc_c, "n")) {
+ if (!mir_strcmp(crc_c, "n")) {
/* crc_c = n, picture transfer accepted */
TlenPsPost(proto, item);
- } else if (!strcmp(crc_c, "f")) {
+ } else if (!mir_strcmp(crc_c, "f")) {
/* crc_c = f, picture cached, no need to transfer again */
LogPictureMessage(proto, item->ft->jid, item->ft->files[0], TRUE);
TlenP2PFreeFileTransfer(item->ft);
diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp index a3920281b7..c68af8606c 100644 --- a/protocols/Tlen/src/tlen_presence.cpp +++ b/protocols/Tlen/src/tlen_presence.cpp @@ -44,7 +44,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) TlenProcessPresenceAvatar(proto, node, item); } } - if (type == NULL || (!strcmp(type, "available"))) { + if (type == NULL || (!mir_strcmp(type, "available"))) { if ((nick=TlenLocalNickFromJID(from)) != NULL) { if ((hContact=TlenHContactFromJID(proto, from)) == NULL) hContact = TlenDBCreateContact(proto, from, nick, FALSE); @@ -55,11 +55,11 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) status = ID_STATUS_ONLINE; if ((showNode=TlenXmlGetChild(node, "show")) != NULL) { if ((show=showNode->text) != NULL) { - if (!strcmp(show, "away")) status = ID_STATUS_AWAY; - else if (!strcmp(show, "xa")) status = ID_STATUS_NA; - else if (!strcmp(show, "dnd")) status = ID_STATUS_DND; - else if (!strcmp(show, "chat")) status = ID_STATUS_FREECHAT; - else if (!strcmp(show, "unavailable")) { + if (!mir_strcmp(show, "away")) status = ID_STATUS_AWAY; + else if (!mir_strcmp(show, "xa")) status = ID_STATUS_NA; + else if (!mir_strcmp(show, "dnd")) status = ID_STATUS_DND; + else if (!mir_strcmp(show, "chat")) status = ID_STATUS_FREECHAT; + else if (!mir_strcmp(show, "unavailable")) { // Always show invisible (on old Tlen client) as invisible (not offline) status = ID_STATUS_OFFLINE; } @@ -106,7 +106,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) mir_free(nick); } } - else if (!strcmp(type, "unavailable")) { + else if (!mir_strcmp(type, "unavailable")) { if (!TlenListExist(proto, LIST_ROSTER, from)) { proto->debugLogA("Receive presence offline from %s (who is not in my roster)", from); TlenListAdd(proto, LIST_ROSTER, from); @@ -153,7 +153,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) proto->debugLogA("%s offline, set contact status to %d", from, status); } } - else if (!strcmp(type, "subscribe")) { + else if (!mir_strcmp(type, "subscribe")) { if (strchr(from, '@') == NULL) { // automatically send authorization allowed to agent/transport TlenSend(proto, "<presence to='%s' type='subscribed'/>", from); @@ -164,7 +164,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) mir_free(nick); } } - else if (!strcmp(type, "subscribed")) { + else if (!mir_strcmp(type, "subscribed")) { if ((item=TlenListGetItemPtr(proto, LIST_ROSTER, from)) != NULL) { if (item->subscription == SUB_FROM) item->subscription = SUB_BOTH; else if (item->subscription == SUB_NONE) { diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index b578bf6e6b..5572212bbb 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -233,7 +233,7 @@ MCONTACT TlenProtocol::AddToListByEvent(int flags, int iContact, MEVENT hDbEvent mir_free(dbei.pBlob);
return NULL;
}
- if (strcmp(dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return NULL;
}
@@ -278,7 +278,7 @@ int TlenProtocol::Authorize(MEVENT hDbEvent) mir_free(dbei.pBlob);
return 1;
}
- if (strcmp(dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return 1;
}
@@ -327,7 +327,7 @@ int TlenProtocol::AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason) mir_free(dbei.pBlob);
return 1;
}
- if (strcmp(dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return 1;
}
@@ -449,7 +449,7 @@ int TlenProtocol::SetAwayMsg(int iStatus, const PROTOCHAR* msg) }
if ((*szMsg == NULL && newModeMsg == NULL) ||
- (*szMsg != NULL && newModeMsg != NULL && !strcmp(*szMsg, newModeMsg))) {
+ (*szMsg != NULL && newModeMsg != NULL && !mir_strcmp(*szMsg, newModeMsg))) {
// Message is the same, no update needed
if (newModeMsg != NULL) mir_free(newModeMsg);
}
@@ -572,7 +572,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr) item->statusMessage==NULL ? (LPARAM)NULL : (LPARAM)(TCHAR*)_A2T(item->statusMessage));
} else {
ptrA ownJid(db_get_sa(NULL, data->proto->m_szModuleName, "jid"));
- if (!strcmp(ownJid, dbv.pszVal)){
+ if (!mir_strcmp(ownJid, dbv.pszVal)){
DBVARIANT dbv2;
if (!db_get_s(data->hContact, "CList", "StatusMsg", &dbv2, DBVT_TCHAR)){
data->proto->ProtoBroadcastAck(data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv2.ptszVal);
@@ -614,11 +614,11 @@ int TlenProtocol::SendMsg(MCONTACT hContact, int, const char* msgRAW) int id = TlenSerialNext(this);
- if (!strcmp(msgRAW, "<alert>")) {
+ if (!mir_strcmp(msgRAW, "<alert>")) {
TlenSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
forkthread(TlenSendMessageAckThread, 0, new SENDACKTHREADDATA(this, hContact, id));
}
- else if (!strcmp(msgRAW, "<image>")) {
+ else if (!mir_strcmp(msgRAW, "<image>")) {
TlenSend(this, "<message to='%s' type='%s' crc='%x' idt='%d'/>", dbv.pszVal, "pic", 0x757f044, id);
forkthread(TlenSendMessageAckThread, 0, new SENDACKTHREADDATA(this, hContact, id));
}
@@ -632,10 +632,10 @@ int TlenProtocol::SendMsg(MCONTACT hContact, int, const char* msgRAW) else
strcpy(msgType, "chat");
- if (!strcmp(msgType, "groupchat") || db_get_b(NULL, m_szModuleName, "MsgAck", FALSE) == FALSE) {
- if (!strcmp(msgType, "groupchat"))
+ if (!mir_strcmp(msgType, "groupchat") || db_get_b(NULL, m_szModuleName, "MsgAck", FALSE) == FALSE) {
+ if (!mir_strcmp(msgType, "groupchat"))
TlenSend(this, "<message to='%s' type='%s'><body>%s</body></message>", dbv.pszVal, msgType, msgEnc);
- else if (!strcmp(msgType, "privchat"))
+ else if (!mir_strcmp(msgType, "privchat"))
TlenSend(this, "<m to='%s'><b n='6' s='10' f='0' c='000000'>%s</b></m>", dbv.pszVal, msgEnc);
else
TlenSend(this, "<message to='%s' type='%s' id='"TLEN_IQID"%d'><body>%s</body><x xmlns='jabber:x:event'><composing/></x></message>", dbv.pszVal, msgType, id, msgEnc);
@@ -875,15 +875,15 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) if (hContact == NULL) return 0;
if (!isConnected) return 0;
- if (!strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szModule, "CList")) {
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
char *nick, *jid, *group;
char *szProto = GetContactProto(hContact);
- if (szProto == NULL || strcmp(szProto, m_szModuleName)) return 0;
+ if (szProto == NULL || mir_strcmp(szProto, m_szModuleName)) return 0;
// A contact's group is changed
- if (!strcmp(cws->szSetting, "Group")) {
+ if (!mir_strcmp(cws->szSetting, "Group")) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
if ((item=TlenListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL) {
db_free(&dbv);
@@ -905,7 +905,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) }
else if (cws->value.pszVal != NULL) {
char *newGroup = settingToChar(cws);
- if (item->group == NULL || strcmp(newGroup, item->group)) {
+ if (item->group == NULL || mir_strcmp(newGroup, item->group)) {
debugLogA("Group set to %s", newGroup);
if ((group=TlenGroupEncode(newGroup)) != NULL) {
TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, item->jid, group);
@@ -923,12 +923,12 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) }
}
// A contact is renamed
- else if (!strcmp(cws->szSetting, "MyHandle")) {
+ else if (!mir_strcmp(cws->szSetting, "MyHandle")) {
char *newNick;
// hContact = (MCONTACT) wParam;
// szProto = GetContactProto(hContact);
-// if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
+// if (szProto == NULL || mir_strcmp(szProto, proto->m_szModuleName)) return 0;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
jid = dbv.pszVal;
@@ -941,7 +941,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) newNick = NULL;
}
// Note: we need to compare with item->nick to prevent infinite loop
- if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && strcmp(item->nick, newNick)))) {
+ if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && mir_strcmp(item->nick, newNick)))) {
if ((nick=TlenTextEncode(newNick)) != NULL) {
debugLogA("Nick set to %s", newNick);
if (item->group != NULL && (group=TlenGroupEncode(item->group)) != NULL) {
@@ -959,7 +959,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) }
}
// A temporary contact has been added permanently
- else if (!strcmp(cws->szSetting, "NotOnList")) {
+ else if (!mir_strcmp(cws->szSetting, "NotOnList")) {
char *jid, *nick, *pGroup;
if (cws->value.type==DBVT_DELETED || (cws->value.type==DBVT_BYTE && cws->value.bVal==0)) {
@@ -1006,7 +1006,7 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam) return 0;
char *szProto = GetContactProto(wParam);
- if (szProto == NULL || strcmp(szProto, m_szModuleName))
+ if (szProto == NULL || mir_strcmp(szProto, m_szModuleName))
return 0;
DBVARIANT dbv;
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index 2b6af296c1..4984a7f6a5 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -418,7 +418,7 @@ static void TlenSendAuth(TlenProtocol *proto) { /* processing <s ... > tag sent from server on session opening */
static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info)
{
- if (node->name == NULL || strcmp(node->name, "s"))
+ if (node->name == NULL || mir_strcmp(node->name, "s"))
return;
char *sid=TlenXmlGetAttrValue(node, "i");
@@ -427,7 +427,7 @@ static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info) info->streamId = mir_strdup(sid);
}
char *s=TlenXmlGetAttrValue(node, "s");
- if (s != NULL && !strcmp(s, "1")) {
+ if (s != NULL && !mir_strcmp(s, "1")) {
int i;
unsigned char aes_key[32];
char aes_key_str[140], aes_iv_str[40];
@@ -474,11 +474,11 @@ static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info) static void TlenProcessStreamClosing(XmlNode *node, ThreadData *info)
{
Netlib_CloseHandle(info->proto);
- if (node->name && !strcmp(node->name, "stream:error") && node->text){
+ if (node->name && !mir_strcmp(node->name, "stream:error") && node->text){
char buffer[1024];
mir_snprintf(buffer, SIZEOF(buffer), "%s\n%s", Translate("Tlen Connection Error"), Translate(node->text));
PUShowMessage(buffer, SM_WARNING);
- } else if (!strcmp(node->name, "s")){
+ } else if (!mir_strcmp(node->name, "s")){
info->proto->debugLogA("Disconnected server message");
}
}
@@ -486,27 +486,27 @@ static void TlenProcessStreamClosing(XmlNode *node, ThreadData *info) /* processing session tags sent from server */
static void TlenProcessProtocol(XmlNode *node, ThreadData *info)
{
- if (!strcmp(node->name, "message"))
+ if (!mir_strcmp(node->name, "message"))
TlenProcessMessage(node, info);
- else if (!strcmp(node->name, "presence"))
+ else if (!mir_strcmp(node->name, "presence"))
TlenProcessPresence(node, info->proto);
- else if (!strcmp(node->name, "iq"))
+ else if (!mir_strcmp(node->name, "iq"))
TlenProcessIq(node, info);
- else if (!strcmp(node->name, "f"))
+ else if (!mir_strcmp(node->name, "f"))
TlenProcessF(node, info);
- else if (!strcmp(node->name, "w"))
+ else if (!mir_strcmp(node->name, "w"))
TlenProcessW(node, info);
- else if (!strcmp(node->name, "m"))
+ else if (!mir_strcmp(node->name, "m"))
TlenProcessM(node, info);
- else if (!strcmp(node->name, "n"))
+ else if (!mir_strcmp(node->name, "n"))
TlenProcessN(node, info);
- else if (!strcmp(node->name, "p"))
+ else if (!mir_strcmp(node->name, "p"))
TlenProcessP(node, info);
- else if (!strcmp(node->name, "v"))
+ else if (!mir_strcmp(node->name, "v"))
TlenProcessV(node, info);
- else if (!strcmp(node->name, "avatar"))
+ else if (!mir_strcmp(node->name, "avatar"))
TlenProcessAvatar(node, info);
- else if (!strcmp(node->name, "cipher"))
+ else if (!mir_strcmp(node->name, "cipher"))
TlenProcessCipher(node, info);
else
info->proto->debugLogA("Invalid top-level tag (only <message/> <presence/> <iq/> <f/> <w/> <m/> <n/> <p/> <v/> <cipher/> and <avatar/> allowed)");
@@ -604,10 +604,10 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) BOOL delivered, composing;
int i;
- if (!node->name || strcmp(node->name, "message")) return;
+ if (!node->name || mir_strcmp(node->name, "message")) return;
char *type=TlenXmlGetAttrValue(node, "type");
- if (type != NULL && !strcmp(type, "error")) {
+ if (type != NULL && !mir_strcmp(type, "error")) {
}
else {
char *from=TlenXmlGetAttrValue(node, "from");
@@ -620,11 +620,11 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) TLEN_LIST_ITEM *item = TlenListGetItemPtr(info->proto, LIST_ROSTER, fromJid);
BOOL isChatRoomJid = TlenListExist(info->proto, LIST_CHATROOM, from);
- if (isChatRoomJid && type != NULL && !strcmp(type, "groupchat")) {
+ if (isChatRoomJid && type != NULL && !mir_strcmp(type, "groupchat")) {
//TlenGroupchatProcessMessage(node, userdata);
- } else if (type != NULL && !strcmp(type, "pic")) {
+ } else if (type != NULL && !mir_strcmp(type, "pic")) {
TlenProcessPic(node, info->proto);
- } else if (type != NULL && !strcmp(type, "iq")) {
+ } else if (type != NULL && !mir_strcmp(type, "iq")) {
XmlNode *iqNode;
// Tlen-compatible iq
if ((iqNode=TlenXmlGetChild(node, "iq")) != NULL) {
@@ -649,12 +649,12 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) i = 1;
while ((xNode=TlenXmlGetNthChild(node, "x", i)) != NULL) {
if ((p=TlenXmlGetAttrValue(xNode, "xmlns")) != NULL) {
- if (!strcmp(p, "jabber:x:delay") && msgTime==0) {
+ if (!mir_strcmp(p, "jabber:x:delay") && msgTime==0) {
if ((p=TlenXmlGetAttrValue(xNode, "stamp")) != NULL) {
msgTime = TlenIsoToUnixTime(p);
}
}
- else if (!strcmp(p, "jabber:x:event")) {
+ else if (!mir_strcmp(p, "jabber:x:event")) {
// Check whether any event is requested
if (!delivered && (n=TlenXmlGetChild(xNode, "delivered")) != NULL) {
delivered = TRUE;
@@ -738,7 +738,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) int id;
int i;
- if (!node->name || strcmp(node->name, "iq")) return;
+ if (!node->name || mir_strcmp(node->name, "iq")) return;
char *type=TlenXmlGetAttrValue(node, "type");
// if ((type=TlenXmlGetAttrValue(node, "type")) == NULL) return;
@@ -765,17 +765,17 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) // MORE GENERAL ROUTINES, WHEN ID DOES NOT MATCH
/////////////////////////////////////////////////////////////////////////
// new p2p connections
- } else if (xmlns != NULL && !strcmp(xmlns, "p2p")) {
+ } else if (xmlns != NULL && !mir_strcmp(xmlns, "p2p")) {
if (info->proto->tlenOptions.useNewP2P) {
TlenProcessP2P(node, info);
}
}
// RECVED: <iq type='set'><query ...
- else if (!strcmp(type, "set") && queryNode != NULL && xmlns != NULL) {
+ else if (!mir_strcmp(type, "set") && queryNode != NULL && xmlns != NULL) {
// RECVED: roster push
// ACTION: similar to iqIdGetRoster above
- if (!strcmp(xmlns, "jabber:iq:roster")) {
+ if (!mir_strcmp(xmlns, "jabber:iq:roster")) {
XmlNode *itemNode, *groupNode;
TLEN_LIST_ITEM *item;
char *name;
@@ -783,11 +783,11 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) info->proto->debugLogA("<iq/> Got roster push, query has %d children", queryNode->numChild);
for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if ((str=TlenXmlGetAttrValue(itemNode, "subscription")) != NULL) {
// we will not add new account when subscription=remove
- if (!strcmp(str, "to") || !strcmp(str, "both") || !strcmp(str, "from") || !strcmp(str, "none")) {
+ if (!mir_strcmp(str, "to") || !mir_strcmp(str, "both") || !mir_strcmp(str, "from") || !mir_strcmp(str, "none")) {
if ((name=TlenXmlGetAttrValue(itemNode, "name")) != NULL) {
nick = TlenTextDecode(name);
} else {
@@ -813,7 +813,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) item->group = NULL;
db_unset(hContact, "CList", "Group");
}
- if (!strcmp(str, "none") || (!strcmp(str, "from") && strchr(jid, '@') != NULL)) {
+ if (!mir_strcmp(str, "none") || (!mir_strcmp(str, "from") && strchr(jid, '@') != NULL)) {
if (db_get_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
}
@@ -824,11 +824,11 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) }
}
if ((item=TlenListGetItemPtr(info->proto, LIST_ROSTER, jid)) != NULL) {
- if (!strcmp(str, "both"))
+ if (!mir_strcmp(str, "both"))
item->subscription = SUB_BOTH;
- else if (!strcmp(str, "to"))
+ else if (!mir_strcmp(str, "to"))
item->subscription = SUB_TO;
- else if (!strcmp(str, "from"))
+ else if (!mir_strcmp(str, "from"))
item->subscription = SUB_FROM;
else
item->subscription = SUB_NONE;
@@ -836,7 +836,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) // subscription = remove is to remove from roster list
// but we will just set the contact to offline and not actually
// remove, so that history will be retained.
- if (!strcmp(str, "remove")) {
+ if (!mir_strcmp(str, "remove")) {
if ((hContact=TlenHContactFromJID(info->proto, jid)) != NULL) {
if (db_get_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
@@ -852,38 +852,38 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) }
// RECVED: <iq type='get'><query ...
- else if ( !strcmp( type, "get" ) && queryNode != NULL && xmlns != NULL ) {
+ else if ( !mir_strcmp( type, "get" ) && queryNode != NULL && xmlns != NULL ) {
// RECVED: software version query
// ACTION: return my software version
- if ( !strcmp( xmlns, "jabber:iq:version" )) TlenProcessIqGetVersion(info->proto, node);
+ if ( !mir_strcmp( xmlns, "jabber:iq:version" )) TlenProcessIqGetVersion(info->proto, node);
}
// RECVED: <iq type='result'><query ...
- else if ( !strcmp( type, "result") && queryNode != NULL) {
+ else if ( !mir_strcmp( type, "result") && queryNode != NULL) {
if (xmlns != NULL ) {
- if ( !strcmp(xmlns, "jabber:iq:roster" )) {
+ if ( !mir_strcmp(xmlns, "jabber:iq:roster" )) {
TlenIqResultRoster(info->proto, node);
- } else if ( !strcmp( xmlns, "jabber:iq:version" )) {
+ } else if ( !mir_strcmp( xmlns, "jabber:iq:version" )) {
TlenIqResultVersion(info->proto, node);
- } else if ( !strcmp( xmlns, "jabber:iq:info" )) {
+ } else if ( !mir_strcmp( xmlns, "jabber:iq:info" )) {
TlenIqResultInfo(info->proto, node);
}
} else {
char *from;
if (( from=TlenXmlGetAttrValue( node, "from" )) != NULL ) {
- if ( !strcmp(from, "tcfg" )) {
+ if ( !mir_strcmp(from, "tcfg" )) {
TlenIqResultTcfg(info->proto, node);
}
}
}
}
// RECVED: <iq type='error'> ...
- else if (!strcmp(type, "error")) {
+ else if (!mir_strcmp(type, "error")) {
TLEN_LIST_ITEM *item;
// Check for file transfer deny by comparing idStr with ft->iqId
i = 0;
while ((i=TlenListFindNext(info->proto, LIST_FILE, i)) >= 0) {
item = TlenListGetItemPtrFromIndex(info->proto,i);
- if (item->ft->state==FT_CONNECTING && !strcmp(idStr, item->ft->iqId)) {
+ if (item->ft->state==FT_CONNECTING && !mir_strcmp(idStr, item->ft->iqId)) {
item->ft->state = FT_DENIED;
if (item->ft->hFileEvent != NULL)
SetEvent(item->ft->hFileEvent); // Simulate the termination of file server connection
@@ -902,7 +902,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info) char *str, *localMessage;
int strSize;
- if (!node->name || strcmp(node->name, "w"))
+ if (!node->name || mir_strcmp(node->name, "w"))
return;
char *body=node->text;
@@ -953,7 +953,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) int i;
XmlNode *xNode, *invNode, *bNode;
- if (!node->name || strcmp(node->name, "m")) return;
+ if (!node->name || mir_strcmp(node->name, "m")) return;
char *f = TlenXmlGetAttrValue(node, "f"); //, *from;//username
if (f != NULL) {
@@ -963,19 +963,19 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) char *tp=TlenXmlGetAttrValue(node, "tp");//typing start/stop
if (tp != NULL) {
TLEN_LIST_ITEM *item = TlenListGetItemPtr(info->proto, LIST_ROSTER, fLogin);
- if (!strcmp(tp, "t")) { //contact is writing
+ if (!mir_strcmp(tp, "t")) { //contact is writing
if (item != NULL ) {
item->isTyping = TRUE;
CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_INFINITE);
}
}
- else if (!strcmp(tp, "u")) {//contact stopped writing
+ else if (!mir_strcmp(tp, "u")) {//contact stopped writing
if (item != NULL) {
item->isTyping = FALSE;
CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
}
}
- else if (!strcmp(tp, "a")) {//alert was received
+ else if (!mir_strcmp(tp, "a")) {//alert was received
int bAlert = TRUE;
if (info->proto->tlenOptions.alertPolicy == TLEN_ALERTS_IGNORE_ALL) {
bAlert = FALSE;
@@ -1011,7 +1011,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) bNode = TlenXmlGetChild(node, "b");
f = TlenTextDecode(f);
if (bNode != NULL && bNode->text != NULL) {
- if (tp != NULL && !strcmp(tp, "p")) {
+ if (tp != NULL && !mir_strcmp(tp, "p")) {
/* MUC private message */
str = TlenResourceFromJID(f);
hContact = TlenDBCreateContact(info->proto, f, str, TRUE);
@@ -1082,7 +1082,7 @@ static void TlenProcessN(XmlNode *node, ThreadData *info) char *str, *popupTitle, *popupText;
int strSize;
- if (!node->name || strcmp(node->name, "n")) return;
+ if (!node->name || mir_strcmp(node->name, "n")) return;
char *s = TlenXmlGetAttrValue(node, "s");
char *f = TlenXmlGetAttrValue(node, "f");
@@ -1118,7 +1118,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) XmlNode *sNode, *xNode, *iNode, *kNode;
int status, flags;
- if (!node->name || strcmp(node->name, "p")) return;
+ if (!node->name || mir_strcmp(node->name, "p")) return;
// presence from users in chat room
flags = 0;
@@ -1167,7 +1167,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) }
sNode = TlenXmlGetChild(node, "s");
if (sNode != NULL) {
- if (!strcmp(sNode->text, "unavailable")) {
+ if (!mir_strcmp(sNode->text, "unavailable")) {
status = ID_STATUS_OFFLINE;
}
}
@@ -1193,7 +1193,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) char jid[128];
TLEN_LIST_ITEM *item;
char *id, *e, *p;
-// if (!node->name || strcmp(node->name, "v")) return;
+// if (!node->name || mir_strcmp(node->name, "v")) return;
char *from=TlenXmlGetAttrValue(node, "f");
if (from != NULL) {
@@ -1203,12 +1203,12 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) strncpy_s(jid, from, _TRUNCATE);
}
if ((e=TlenXmlGetAttrValue(node, "e")) != NULL) {
- if (!strcmp(e, "1")) {
+ if (!mir_strcmp(e, "1")) {
if ((id=TlenXmlGetAttrValue(node, "i")) != NULL) {
SkinPlaySound("TlenVoiceNotify");
TlenVoiceAccept(info->proto, id, from);
}
- } else if (!strcmp(e, "3")) {
+ } else if (!mir_strcmp(e, "3")) {
// FILE_RECV : e='3' : invalid transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
@@ -1230,28 +1230,28 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) }
}
}
- } else if (!strcmp(e, "4")) {
+ } else if (!mir_strcmp(e, "4")) {
// FILE_SEND : e='4' : File sending request was denied by the remote client
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
- if (!strcmp(item->ft->jid, jid)) {
+ if (!mir_strcmp(item->ft->jid, jid)) {
TlenVoiceCancelAll(info->proto);
//TlenListRemove(info->proto, LIST_VOICE, p);
}
}
}
- } else if (!strcmp(e, "5")) {
+ } else if (!mir_strcmp(e, "5")) {
// FILE_SEND : e='5' : Voice request was accepted
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
info->proto->debugLogA("should start voice 1 ? %s ?? %s", jid, item->ft->jid);
- if (!strcmp(item->ft->jid, jid)) {
+ if (!mir_strcmp(item->ft->jid, jid)) {
info->proto->debugLogA("starting voice 1");
TlenVoiceStart(item->ft, 1);
}
}
}
- } else if (!strcmp(e, "6")) {
+ } else if (!mir_strcmp(e, "6")) {
// FILE_RECV : e='6' : IP and port information to connect to get file
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
@@ -1266,7 +1266,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "7")) {
+ else if (!mir_strcmp(e, "7")) {
// FILE_RECV : e='7' : IP and port information to connect to send file
// in case the conection to the given server was not successful
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
@@ -1283,7 +1283,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "8")) {
+ else if (!mir_strcmp(e, "8")) {
// FILE_RECV : e='8' : transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index dc1414196d..453b0120c8 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -132,7 +132,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam) MCONTACT hContact = (MCONTACT) lParam;
char *szProto = GetContactProto(hContact);
- if ((szProto != NULL && !strcmp(szProto, m_szModuleName)) || !lParam) {
+ if ((szProto != NULL && !mir_strcmp(szProto, m_szModuleName)) || !lParam) {
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
odp.flags = ODPF_TCHAR;
diff --git a/protocols/Tlen/src/tlen_xml.cpp b/protocols/Tlen/src/tlen_xml.cpp index 04e6aa79a3..408df2ab3a 100644 --- a/protocols/Tlen/src/tlen_xml.cpp +++ b/protocols/Tlen/src/tlen_xml.cpp @@ -279,7 +279,7 @@ static BOOL TlenXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char *e if (elemText == NULL) return FALSE; - if (elemType == ELEM_OPEN && !strcmp(elemText, "?xml")) { + if (elemType == ELEM_OPEN && !mir_strcmp(elemText, "?xml")) { // TlenLog("XML: skip <?xml> tag"); return TRUE; } @@ -349,7 +349,7 @@ static BOOL TlenXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char *e } break; case ELEM_CLOSE: - if (node->name != NULL && !strcmp(node->name, text)) { + if (node->name != NULL && !mir_strcmp(node->name, text)) { node->state = NODE_CLOSE; int nodeDepth = node->depth; if (nodeDepth == 1 && xmlState->callback1_close != NULL) { @@ -390,7 +390,7 @@ char *TlenXmlGetAttrValue(XmlNode *node, char *key) if (node == NULL || node->numAttr <= 0 || key == NULL || mir_strlen(key) <= 0) return NULL; for (i=0; i<node->numAttr; i++) { - if (node->attr[i]->name && !strcmp(key, node->attr[i]->name)) + if (node->attr[i]->name && !mir_strcmp(key, node->attr[i]->name)) return node->attr[i]->value; } return NULL; @@ -409,7 +409,7 @@ XmlNode *TlenXmlGetNthChild(XmlNode *node, char *tag, int nth) return NULL; num = 1; for (i=0; i<node->numChild; i++) { - if (node->child[i]->name && !strcmp(tag, node->child[i]->name)) { + if (node->child[i]->name && !mir_strcmp(tag, node->child[i]->name)) { if (num == nth) { return node->child[i]; } @@ -427,9 +427,9 @@ XmlNode *TlenXmlGetChildWithGivenAttrValue(XmlNode *node, char *tag, char *attrK if (node == NULL || node->numChild <= 0 || tag == NULL || mir_strlen(tag) <= 0 || attrKey == NULL || mir_strlen(attrKey) <= 0 || attrValue == NULL || mir_strlen(attrValue) <= 0) return NULL; for (i=0; i<node->numChild; i++) { - if (node->child[i]->name && !strcmp(tag, node->child[i]->name)) { + if (node->child[i]->name && !mir_strcmp(tag, node->child[i]->name)) { if ((str=TlenXmlGetAttrValue(node->child[i], attrKey)) != NULL) - if (!strcmp(str, attrValue)) + if (!mir_strcmp(str, attrValue)) return node->child[i]; } } diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp index 62af4e6816..12600ec239 100644 --- a/protocols/Tox/src/tox_chatrooms.cpp +++ b/protocols/Tox/src/tox_chatrooms.cpp @@ -80,7 +80,7 @@ int CToxProto::OnGroupChatEventHook(WPARAM, LPARAM lParam) {
return 1;
}
- else if (strcmp(gch->pDest->pszModule, this->m_szModuleName) != 0)
+ else if (mir_strcmp(gch->pDest->pszModule, this->m_szModuleName) != 0)
{
return 0;
}
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 2611f185a1..dfd9159fcc 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -31,7 +31,7 @@ MCONTACT CToxProto::GetContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return INVALID_CONTACT_ID;
- if (strcmp(dbei.szModule, m_szModuleName) != 0)
+ if (mir_strcmp(dbei.szModule, m_szModuleName) != 0)
return INVALID_CONTACT_ID;
return DbGetAuthEventContact(&dbei);
@@ -402,7 +402,7 @@ int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) MCONTACT hContact = lParam;
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, m_szModuleName))
+ if (szProto != NULL && !mir_strcmp(szProto, m_szModuleName))
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE;
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index 17ded4336d..5990cb63a1 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -59,7 +59,7 @@ void TwitterProto::UpdateChat(const twitter_user &update) int TwitterProto::OnChatOutgoing(WPARAM, LPARAM lParam)
{
GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam);
- if (strcmp(hook->pDest->pszModule, m_szModuleName))
+ if (mir_strcmp(hook->pDest->pszModule, m_szModuleName))
return 0;
switch (hook->pDest->iType) {
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 674516a5b3..cea1ce17ef 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -197,7 +197,7 @@ int TwitterProto::OnContactDeleted(WPARAM hContact, LPARAM) bool TwitterProto::IsMyContact(MCONTACT hContact, bool include_chat)
{
char *proto = GetContactProto(hContact);
- if (proto && strcmp(m_szModuleName, proto) == 0) {
+ if (proto && mir_strcmp(m_szModuleName, proto) == 0) {
if (include_chat)
return true;
return !isChatRoom(hContact);
@@ -213,7 +213,7 @@ MCONTACT TwitterProto::UsernameToHContact(const char *name) DBVARIANT dbv;
if (!db_get_s(hContact, m_szModuleName, TWITTER_KEY_UN, &dbv)) {
- if (strcmp(name, dbv.pszVal) == 0) {
+ if (mir_strcmp(name, dbv.pszVal) == 0) {
db_free(&dbv);
return hContact;
}
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 8a0d3960cc..50237a2ce6 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -43,7 +43,7 @@ void InitIcons(void) HANDLE GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return hIconLibItem[i];
return 0;
@@ -61,7 +61,7 @@ static TwitterProto * GetInstanceByHContact(MCONTACT hContact) return 0;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(proto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
diff --git a/protocols/Twitter/src/twitter.cpp b/protocols/Twitter/src/twitter.cpp index 4a321675e0..98da36c8d5 100644 --- a/protocols/Twitter/src/twitter.cpp +++ b/protocols/Twitter/src/twitter.cpp @@ -381,7 +381,7 @@ static char *month_names[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", int parse_month(const char *m)
{
for (int i = 0; i < 12; i++)
- if (strcmp(month_names[i], m) == 0)
+ if (mir_strcmp(month_names[i], m) == 0)
return i;
return -1;
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 071212cfdd..e90b7b84fd 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -631,7 +631,7 @@ MCONTACT CVkProto::MContactFromDbEvent(MEVENT hDbEvent) if (db_event_get(hDbEvent, &dbei))
return INVALID_CONTACT_ID;
- if (dbei.eventType != EVENTTYPE_AUTHREQUEST || strcmp(dbei.szModule, m_szModuleName))
+ if (dbei.eventType != EVENTTYPE_AUTHREQUEST || mir_strcmp(dbei.szModule, m_szModuleName))
return INVALID_CONTACT_ID;
MCONTACT hContact = DbGetAuthEventContact(&dbei);
@@ -775,12 +775,12 @@ int CVkProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) if (hContact != NULL)
return 0;
- if (strcmp(cws->szModule, "ListeningTo"))
+ if (mir_strcmp(cws->szModule, "ListeningTo"))
return 0;
CMStringA szListeningTo(m_szModuleName);
szListeningTo += "Enabled";
- if (!strcmp(cws->szSetting, szListeningTo.GetBuffer())) {
+ if (!mir_strcmp(cws->szSetting, szListeningTo.GetBuffer())) {
MusicSendMetod iOldMusicSendMetod = (MusicSendMetod)getByte("OldMusicSendMetod", sendBroadcastAndStatus);
if (cws->value.bVal == 0)
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index 768ad6cccf..e5c5b6c9f5 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -16,7 +16,7 @@ void InitIcons(void) HANDLE GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return icons[i].hIcolib;
return 0;
@@ -25,7 +25,7 @@ HANDLE GetIconHandle(const char* name) char* GetIconDescription(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return icons[i].szDescr;
return "";
@@ -39,7 +39,7 @@ static WhatsAppProto* GetInstanceByHContact(MCONTACT hContact) return 0;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(proto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 167495b2d6..c792d791a8 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -202,7 +202,7 @@ BOOL Xfire_game::checkpath(PROCESSENTRY32* processInfo) this->strtolowerT(fpath);
if (this->wildcmp(_A2T(this->path), fpath))
- //if (strcmp(this->path,fpath)==0)
+ //if (mir_strcmp(this->path,fpath)==0)
{
//pfad stimmt überein, commandline prüfen
if (checkCommandLine(op, this->mustcontain, this->notcontain))
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 4e98b8e381..643f97f037 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -154,7 +154,7 @@ void Xfire_gamelist::createStartmenu() Xfire_game* game = (Xfire_game*)gamelist.at(sorttemp[i - 1]);
Xfire_game* game2 = (Xfire_game*)gamelist.at(sorttemp[i]);
//sortieren
- if (strcmp(game->name, game2->name) > 0)
+ if (mir_strcmp(game->name, game2->name) > 0)
{
int tempi = sorttemp[i - 1];
sorttemp[i - 1] = sorttemp[i];
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index f2aac56cde..a94599b1f3 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -829,7 +829,7 @@ INT_PTR UrlCall(WPARAM wparam, LPARAM lparam) { //abschneiden
*q = 0;
//ein addfriend url request?
- if (strcmp("add_friend", type) == 0)
+ if (mir_strcmp("add_friend", type) == 0)
{
q++;
//nach = suchen
@@ -840,7 +840,7 @@ INT_PTR UrlCall(WPARAM wparam, LPARAM lparam) { *g = 0;
g++;
//user parameter?
- if (strcmp("user", q) == 0)
+ if (mir_strcmp("user", q) == 0)
{
//tempbuffer für die frage and en user
char temp[100];
@@ -2800,7 +2800,7 @@ MCONTACT handlingBuddys(BuddyListEntry *entry, int clan, char*group, BOOL dontsc }
else
{
- if (strcmp(entry->lastpopup, temp) != 0)
+ if (mir_strcmp(entry->lastpopup, temp) != 0)
{
delete[] entry->lastpopup;
entry->lastpopup = NULL;
diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp index a73e624d56..e9d70c319e 100644 --- a/protocols/Xfire/src/searching4games.cpp +++ b/protocols/Xfire/src/searching4games.cpp @@ -269,7 +269,7 @@ void Scan4Games(LPVOID lparam) if (gpps != NULL) xfire_GetPrivateProfileString(temp, "SoftwareType", "", entrytype, 100, inipath);
//kein eintrag? voicechat? musiapplicationen? schon in der gameliste?
- if (gpps != NULL && strcmp(entrytype, "Music") != 0 && strcmp(entrytype, "VoiceChat") != 0 && !xgamelist.Gameinlist(i)) //was gefunden und noch nicht eintragen?
+ if (gpps != NULL && mir_strcmp(entrytype, "Music") != 0 && mir_strcmp(entrytype, "VoiceChat") != 0 && !xgamelist.Gameinlist(i)) //was gefunden und noch nicht eintragen?
{
BOOL MatchExe = FALSE;
//MatchExe Games in der automatischen Suche skippen
diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp index 45873fd9a4..1cf26c35be 100644 --- a/protocols/Xfire/src/variables.cpp +++ b/protocols/Xfire/src/variables.cpp @@ -165,13 +165,13 @@ char* XFireGetFoldersPath(char * pathtype) {// Get XFire folder path
static char path[1024]; path[0] = 0;
if (ServiceExists(MS_FOLDERS_REGISTER_PATH)){
- if (!strcmp(pathtype, "Avatar")){
+ if (!mir_strcmp(pathtype, "Avatar")){
FoldersGetCustomPath(XFireAvatarFolder, path, 1024, "");
}
- if (!strcmp(pathtype, "IniFile")){
+ if (!mir_strcmp(pathtype, "IniFile")){
FoldersGetCustomPath(XFireWorkingFolder, path, 1024, "");
}
- if (!strcmp(pathtype, "IconsFile")){
+ if (!mir_strcmp(pathtype, "IconsFile")){
FoldersGetCustomPath(XFireIconFolder, path, 1024, "");
}
strcat(path, "\\");
@@ -198,7 +198,7 @@ char* XFireGetFoldersPath(char * pathtype) strcat(BaseFolder, "XFire");
strcat(BaseFolder, "\\");
/*******BASE********/
- if (!strcmp(pathtype, "Avatar")){
+ if (!mir_strcmp(pathtype, "Avatar")){
strcat(BaseFolder, "Avatars");
strcat(BaseFolder, "\\");
}
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index b99cd41887..39e584b655 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -63,7 +63,7 @@ void ext_yahoo_got_conf_invite(int id, const char *me, const char *who, const ch CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room);
if (!cm)
{
- if (strcmp(who, me))
+ if (mir_strcmp(who, me))
{
cm = new CYahooProto::ChatRoom(room, members);
ppro->m_chatrooms.insert(cm);
@@ -109,7 +109,7 @@ void ext_yahoo_conf_userjoin(int id, const char *me, const char *who, const char if (!cm) return;
for (YList *l = cm->members; l; l = l->next)
{
- if (!strcmp(who, (char*)l->data))
+ if (!mir_strcmp(who, (char*)l->data))
return;
}
@@ -127,7 +127,7 @@ void ext_yahoo_conf_userleave(int id, const char *me, const char *who, const cha for (YList *l = cm->members; l; l = l->next)
{
- if (strcmp((char*)l->data, who) == 0)
+ if (mir_strcmp((char*)l->data, who) == 0)
{
free(l->data);
y_list_remove_link(cm->members, l);
@@ -268,7 +268,7 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) GCHOOK *gch = (GCHOOK*) lParam;
if (!gch) return 1;
- if (strcmp(gch->pDest->pszModule, m_szModuleName)) return 0;
+ if (mir_strcmp(gch->pDest->pszModule, m_szModuleName)) return 0;
char* room = mir_t2a(gch->pDest->ptszID);
char* who = mir_t2a(gch->ptszUID);
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 6183eda35d..50fa071785 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -161,7 +161,7 @@ MCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, MEV return 0;
}
- if ( strcmp(dbei.szModule, m_szModuleName)) {
+ if ( mir_strcmp(dbei.szModule, m_szModuleName)) {
debugLogA("[YahooAddToListByEvent] ERROR: Not Yahoo protocol.");
return 0;
}
@@ -197,7 +197,7 @@ int CYahooProto::Authorize(MEVENT hdbe) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if ( strcmp(dbei.szModule, m_szModuleName))
+ if ( mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
/* Need to remove the buddy from our Miranda Lists */
@@ -240,7 +240,7 @@ int CYahooProto::AuthDeny(MEVENT hdbe, const TCHAR *reason) return 1;
}
- if (strcmp( dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp( dbei.szModule, m_szModuleName)) {
debugLogA("YahooAuthDeny - wrong module?");
return 1;
}
@@ -610,7 +610,7 @@ int __cdecl CYahooProto::UserIsTyping(MCONTACT hContact, int type) return 0;
char *szProto = GetContactProto(hContact);
- if (szProto == NULL || strcmp(szProto, m_szModuleName))
+ if (szProto == NULL || mir_strcmp(szProto, m_szModuleName))
return 0;
DBVARIANT dbv;
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index f1fa073687..f1bb3ee42f 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -111,7 +111,7 @@ struct CYahooProto : public PROTO<CYahooProto> free(name); y_list_free(members); }
static int compare(const ChatRoom* c1, const ChatRoom* c2)
- { return strcmp(c1->name, c2->name); }
+ { return mir_strcmp(c1->name, c2->name); }
};
OBJLIST <ChatRoom> m_chatrooms;
diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index 7a3da1782f..e80e27feb2 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -158,7 +158,7 @@ int __cdecl CYahooProto::OnSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if ( !strcmp(cws->szSetting, "ApparentMode")) {
+ if ( !mir_strcmp(cws->szSetting, "ApparentMode")) {
debugLogA("DB Setting changed. YAHOO user's visible setting changed.");
DBVARIANT dbv;
@@ -177,7 +177,7 @@ bool CYahooProto::IsMyContact(MCONTACT hContact) return false;
char* szProto = GetContactProto(hContact);
- return szProto && !strcmp(szProto, m_szModuleName);
+ return szProto && !mir_strcmp(szProto, m_szModuleName);
}
extern PLUGININFOEX pluginInfo;
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index b0fb7b6aa5..3f70ae957a 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -771,10 +771,10 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha hContact = add_buddy(who, nick, protocol, PALF_TEMPORARY);
- if (strcmp(nick, who) != 0)
+ if (mir_strcmp(nick, who) != 0)
SetStringUtf(hContact, "Nick", nick);
- if (strcmp(myid, m_yahoo_id))
+ if (mir_strcmp(myid, m_yahoo_id))
setString(hContact, "MyIdentity", myid);
else
delSetting(hContact, "MyIdentity");
|