summaryrefslogtreecommitdiff
path: root/protocols/MSN/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r--protocols/MSN/src/msn_contact.cpp2
-rw-r--r--protocols/MSN/src/msn_errors.cpp2
-rw-r--r--protocols/MSN/src/msn_misc.cpp10
-rw-r--r--protocols/MSN/src/msn_opts.cpp10
-rw-r--r--protocols/MSN/src/msn_proto.cpp12
-rw-r--r--protocols/MSN/src/msn_skypeab.cpp24
-rw-r--r--protocols/MSN/src/msn_soapab.cpp13
-rw-r--r--protocols/MSN/src/msn_soapstore.cpp11
-rw-r--r--protocols/MSN/src/msn_ws.cpp3
9 files changed, 44 insertions, 43 deletions
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp
index 7ae6366836..bfa8f8253c 100644
--- a/protocols/MSN/src/msn_contact.cpp
+++ b/protocols/MSN/src/msn_contact.cpp
@@ -76,6 +76,8 @@ MCONTACT CMsnProto::MSN_HContactFromChatID(const char* wlid)
void CMsnProto::MSN_SetContactDb(MCONTACT hContact, const char *szEmail)
{
MsnContact *cont = Lists_Get(szEmail);
+ if (cont == NULL)
+ return;
const int listId = cont->list;
if (listId & LIST_FL) {
diff --git a/protocols/MSN/src/msn_errors.cpp b/protocols/MSN/src/msn_errors.cpp
index e3a40a247c..f67293eb2d 100644
--- a/protocols/MSN/src/msn_errors.cpp
+++ b/protocols/MSN/src/msn_errors.cpp
@@ -58,7 +58,7 @@ int CMsnProto::MSN_HandleErrors(ThreadData* info, char* cmdString)
}
HReadBuffer buf(info, 0);
- char* msgBody = (char*)buf.surelyRead(atol(data.strMsgBytes));
+// char* msgBody = (char*)buf.surelyRead(atol(data.strMsgBytes));
debugLogA("Server error:%s", cmdString);
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index 2160bd233b..4077447e09 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -426,7 +426,11 @@ void CMsnProto::MSN_GoOffline(void)
/////////////////////////////////////////////////////////////////////////////////////////
// MSN_SendMessage - formats and sends a MSG packet through the server
+#ifdef OBSOLETE
int ThreadData::sendMessage(int msgType, const char* email, int netId, const char* parMsg, int parFlags)
+#else
+int ThreadData::sendMessage(int, const char *email, int netId, const char *parMsg, int parFlags)
+#endif
{
CMStringA buf;
@@ -610,7 +614,11 @@ static char * HtmlEncodeUTF8T(const TCHAR *src)
return HtmlEncode(UTF8(src));
}
+#ifdef OBSOLETE
void CMsnProto::MSN_SendStatusMessage(const char* msg)
+#else
+void CMsnProto::MSN_SendStatusMessage(const char*)
+#endif
{
if (!msnLoggedIn)
return;
@@ -743,7 +751,7 @@ int ThreadData::sendPacketPayload(const char* cmd, const char *param, const char
thisTrid = InterlockedIncrement(&mTrid);
int regSz = proto->msnRegistration ? (int)mir_strlen(proto->msnRegistration)+16 : 0;
- int paramStart = mir_snprintf(str, strsize, "%s %d %s ", cmd, thisTrid, param), strszstart = 0, strSz;
+ int paramStart = mir_snprintf(str, strsize, "%s %d %s ", cmd, thisTrid, param), strSz;
while ((strSz = mir_vsnprintf(str + paramStart, strsize - paramStart - regSz - 10, fmt, vararg)) == -1)
str = (char*)mir_realloc(str, strsize += 512);
if (strSz) strSz+=2;
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index 0df5ac0502..bd94c90779 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -378,7 +378,6 @@ static INT_PTR CALLBACK DlgProcMsnConnOpts(HWND hwndDlg, UINT msg, WPARAM wParam
case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY) {
- bool reconnectRequired = false;
char str[MAX_PATH];
CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -403,8 +402,11 @@ static INT_PTR CALLBACK DlgProcMsnConnOpts(HWND hwndDlg, UINT msg, WPARAM wParam
TranslateT("MSN Protocol"), MB_OK | MB_ICONINFORMATION);
}
}
-
+
+#ifdef OBSOLETE
unsigned gethst2 = proto->getByte("AutoGetHost", 1);
+
+#endif
unsigned gethst = SendDlgItemMessage(hwndDlg, IDC_HOSTOPT, CB_GETCURSEL, 0, 0);
if (gethst < 2) gethst = !gethst;
proto->setByte("AutoGetHost", (BYTE)gethst);
@@ -420,10 +422,6 @@ static INT_PTR CALLBACK DlgProcMsnConnOpts(HWND hwndDlg, UINT msg, WPARAM wParam
proto->ForkThread(&CMsnProto::MSNConnDetectThread, NULL);
#endif
- if (reconnectRequired && proto->msnLoggedIn)
- MessageBox(hwndDlg, TranslateT("The changes you have made require you to reconnect to the MSN Messenger network before they take effect"),
- TranslateT("MSN Options"), MB_OK);
-
proto->LoadOptions();
return TRUE;
}
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index bde4541e40..cccdb9064f 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -819,7 +819,7 @@ int __cdecl CMsnProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
return Proto_RecvMessage(hContact, pre);
}
-int CMsnProto::GetInfo(MCONTACT hContact, int infoType)
+int CMsnProto::GetInfo(MCONTACT hContact, int)
{
if (MyOptions.netId == NETID_SKYPE) {
char tEmail[MSN_MAX_EMAIL_LEN];
@@ -1001,14 +1001,14 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
ForkThread(&CMsnProto::MsnFakeAck, new TFakeAckParams(hContact, seq, errMsg, this));
}
else {
+#ifdef OBSOLETE
const char msgType = MyOptions.SlowSend ? 'A' : 'N';
bool isOffline;
- ThreadData* thread;
-#ifdef OBSOLETE
- thread = MSN_StartSB(tEmail, isOffline);
+ ThreadData *thread = MSN_StartSB(tEmail, isOffline);
#else
/* MSNP24 doesn't have a switchboard anymore */
- thread = NULL; isOffline = true;
+ bool isOffline = true;
+ ThreadData *thread = NULL;
#endif
if (thread == NULL) {
@@ -1042,7 +1042,7 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
/////////////////////////////////////////////////////////////////////////////////////////
// MsnSendContacts - sends contacts to a certain user
-int __cdecl CMsnProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
+int __cdecl CMsnProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hContactsList)
{
if (!msnLoggedIn)
return 0;
diff --git a/protocols/MSN/src/msn_skypeab.cpp b/protocols/MSN/src/msn_skypeab.cpp
index 6137f6bda3..5c7c40ab6a 100644
--- a/protocols/MSN/src/msn_skypeab.cpp
+++ b/protocols/MSN/src/msn_skypeab.cpp
@@ -60,7 +60,6 @@ static TCHAR *get_json_str(JSONNODE *item, const char *pszValue)
bool CMsnProto::MSN_SKYABRefreshClist(void)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[3];
CMStringA post;
bool bRet = false;
@@ -72,7 +71,7 @@ bool CMsnProto::MSN_SKYABRefreshClist(void)
// Query addressbook
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -116,7 +115,6 @@ bool CMsnProto::MSN_SKYABRefreshClist(void)
bool CMsnProto::MSN_SKYABGetProfiles(const char *pszPOST)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[4];
bool bRet = false;
@@ -128,7 +126,7 @@ bool CMsnProto::MSN_SKYABGetProfiles(const char *pszPOST)
nlhr.pData = (char*)pszPOST;
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -171,7 +169,6 @@ bool CMsnProto::MSN_SKYABGetProfiles(const char *pszPOST)
bool CMsnProto::MSN_SKYABGetProfile(const char *wlid)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[4];
bool bRet = false;
char szURL[256];
@@ -183,7 +180,7 @@ bool CMsnProto::MSN_SKYABGetProfile(const char *wlid)
nlhr.szUrl = szURL;
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -244,7 +241,6 @@ bool CMsnProto::MSN_SKYABGetProfile(const char *wlid)
bool CMsnProto::MSN_SKYABBlockContact(const char *wlid, const char *pszAction)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[4];
bool bRet = false;
char szURL[256], szPOST[128];
@@ -261,7 +257,7 @@ bool CMsnProto::MSN_SKYABBlockContact(const char *wlid, const char *pszAction)
nlhr.pData = szPOST;
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -274,7 +270,6 @@ bool CMsnProto::MSN_SKYABBlockContact(const char *wlid, const char *pszAction)
bool CMsnProto::MSN_SKYABDeleteContact(const char *wlid)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[4];
bool bRet = false;
char szURL[256];
@@ -289,7 +284,7 @@ bool CMsnProto::MSN_SKYABDeleteContact(const char *wlid)
nlhr.headersCount++;
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -303,7 +298,6 @@ bool CMsnProto::MSN_SKYABDeleteContact(const char *wlid)
bool CMsnProto::MSN_SKYABAuthRsp(const char *wlid, const char *pszAction)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[3];
bool bRet = false;
char szURL[256];
@@ -315,7 +309,7 @@ bool CMsnProto::MSN_SKYABAuthRsp(const char *wlid, const char *pszAction)
nlhr.szUrl = szURL;
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -328,7 +322,6 @@ bool CMsnProto::MSN_SKYABAuthRsp(const char *wlid, const char *pszAction)
bool CMsnProto::MSN_SKYABAuthRq(const char *wlid, const char *pszGreeting)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[4];
bool bRet = false;
char szURL[256];
@@ -347,7 +340,7 @@ bool CMsnProto::MSN_SKYABAuthRq(const char *wlid, const char *pszGreeting)
nlhr.pData = (char*)(const char*)post;
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -360,7 +353,6 @@ bool CMsnProto::MSN_SKYABAuthRq(const char *wlid, const char *pszGreeting)
bool CMsnProto::MSN_SKYABSearch(const char *keyWord, HANDLE hSearch)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[4];
bool bRet = false;
char szURL[256];
@@ -378,7 +370,7 @@ bool CMsnProto::MSN_SKYABSearch(const char *keyWord, HANDLE hSearch)
nlhr.headersCount++;
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp
index 02f1ead4d4..a3785c4adf 100644
--- a/protocols/MSN/src/msn_soapab.cpp
+++ b/protocols/MSN/src/msn_soapab.cpp
@@ -409,8 +409,8 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c
ezxml_free(xmlp);
- unsigned status;
- char *abUrl = NULL, *tResult;
+ unsigned status = 0;
+ char *abUrl = NULL, *tResult = NULL;
for (int k = 4; --k;) {
mir_free(abUrl);
@@ -872,7 +872,6 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas
bool CMsnProto::MSN_ABRefreshClist(void)
{
NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPREQUEST *nlhrReply;
NETLIBHTTPHEADER headers[2];
bool bRet = false;
@@ -893,7 +892,7 @@ bool CMsnProto::MSN_ABRefreshClist(void)
// Query addressbook
mHttpsTS = clock();
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUserHttps, (LPARAM)&nlhr);
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -906,7 +905,7 @@ 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 && !mir_strcmp(cid, mycid)) continue;
+ if (!mir_strcmp(cid, mycid)) continue;
for (ezxml_t cont = ezxml_get(pers, "contacts", 0, "Contact", -1); cont != NULL; cont = ezxml_next(cont)) {
int netId;
@@ -1601,8 +1600,8 @@ void CMsnProto::MSN_ABUpdateDynamicItem(bool allowRecurse)
char* szData = ezxml_toxml(xmlp, true);
ezxml_free(xmlp);
- unsigned status;
- char *abUrl = NULL, *tResult;
+ unsigned status = 0;
+ char *abUrl = NULL, *tResult = NULL;
for (int k = 4; --k;) {
mir_free(abUrl);
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp
index 0b5db5c419..8dce12549e 100644
--- a/protocols/MSN/src/msn_soapstore.cpp
+++ b/protocols/MSN/src/msn_soapstore.cpp
@@ -165,10 +165,9 @@ bool CMsnProto::MSN_StoreShareItem(const char* id, bool allowRecurse)
ezxml_free(xmlp);
unsigned status = 0;
- char *storeUrl, *tResult = NULL;
- storeUrl = mir_strdup("https://storage.msn.com/storageservice/SchematizedStore.asmx");
- tResult = getSslResult(&storeUrl, szData, reqHdr, status);
+ char *storeUrl = mir_strdup("https://storage.msn.com/storageservice/SchematizedStore.asmx");
+ char *tResult = getSslResult(&storeUrl, szData, reqHdr, status);
mir_free(reqHdr);
free(szData);
@@ -243,8 +242,10 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse)
mir_free(storeUrl);
storeUrl = GetStoreHost("GetProfile");
tResult = getSslResult(&storeUrl, szData, reqHdr, status);
- if (tResult == NULL) UpdateStoreHost("GetProfile", NULL);
- else break;
+ if (tResult == NULL)
+ UpdateStoreHost("GetProfile", NULL);
+ else
+ break;
}
mir_free(reqHdr);
diff --git a/protocols/MSN/src/msn_ws.cpp b/protocols/MSN/src/msn_ws.cpp
index b887850164..902041ae97 100644
--- a/protocols/MSN/src/msn_ws.cpp
+++ b/protocols/MSN/src/msn_ws.cpp
@@ -62,8 +62,9 @@ bool ThreadData::isTimeout(void)
res = !proto->usingGateway;
}
else if (mJoinedContactsWLID.getCount() <= 1 || mChatID[0] == 0) {
+#ifdef OBSOLETE
MCONTACT hContact = getContactHandle();
-
+#endif
if (mJoinedContactsWLID.getCount() == 0 || termPending)
res = true;
#ifdef OBSOLETE