summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_p2p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN/src/msn_p2p.cpp')
-rw-r--r--protocols/MSN/src/msn_p2p.cpp46
1 files changed, 23 insertions, 23 deletions
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);