diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-14 14:49:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-14 14:49:06 +0000 |
commit | 7ff042f06d3fdaa24622f66e9c08012611fd4fa4 (patch) | |
tree | 6dcd34057d987ec1f8ca72233ba0495a59affb67 | |
parent | 662c4b333d83c70ae05fbcea2dd685e6a3524983 (diff) |
various minor issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@6059 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_adhoc.cpp | 14 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_caps.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_groupchat.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_list.cpp | 1 |
6 files changed, 11 insertions, 14 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index be1b656a16..3ab0d326bd 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -58,7 +58,6 @@ struct MESSAGESUBDATA TCHAR* szSearchQuery;
TCHAR* szSearchResult;
SESSION_INFO *lastSession;
- TCHAR szTabSave[20];
BOOL iSavedSpaces;
};
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index f7f8affed1..8d5c743f6d 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -537,12 +537,12 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam) int res = -1;
if ((hContact != NULL || lParam != 0) && m_bJabberOnline) {
- DBVARIANT dbv;
- if (wParam && !getTString(hContact, "jid", &dbv)) {
+ ptrT szJid( getTStringA(hContact, "jid"));
+ if (wParam && szJid != NULL) {
JABBER_LIST_ITEM *item = NULL;
int selected = 0;
TCHAR jid[JABBER_MAX_JID_LEN];
- _tcsncpy(jid, dbv.ptszVal, SIZEOF(jid));
+ _tcsncpy(jid, szJid, SIZEOF(jid));
{
mir_cslock lck(m_csLists);
item = ListGetItemPtr(LIST_ROSTER, jid);
@@ -551,11 +551,11 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam) HMENU hMenu = CreatePopupMenu();
for (int i=0; i < item->arResources.getCount(); i++)
AppendMenu(hMenu,MF_STRING,i+1, item->arResources[i]->resourceName);
- HWND hwndTemp=CreateWindowEx(WS_EX_TOOLWINDOW,_T("button"),_T("PopupMenuHost"),0,0,0,10,10,NULL,NULL,hInst,NULL);
+ HWND hwndTemp = CreateWindowEx(WS_EX_TOOLWINDOW,_T("button"),_T("PopupMenuHost"),0,0,0,10,10,NULL,NULL,hInst,NULL);
SetForegroundWindow(hwndTemp);
+ RECT rc;
POINT pt;
GetCursorPos(&pt);
- RECT rc;
selected = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndTemp, &rc);
DestroyMenu(hMenu);
DestroyWindow(hwndTemp);
@@ -573,12 +573,10 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam) }
}
- if ( !item || selected) {
+ if (item == NULL || selected) {
CJabberAdhocStartupParams* pStartupParams = new CJabberAdhocStartupParams(this, jid, NULL);
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FORM), NULL, JabberAdHoc_CommandDlgProc, (LPARAM)(pStartupParams));
}
- db_free(&dbv);
-
}
else if (lParam != 0)
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FORM), NULL, JabberAdHoc_CommandDlgProc, lParam);
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 524ece8816..4ab1b65fda 100644 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -97,7 +97,7 @@ const JabberFeatCapPair g_JabberFeatCapPairsExt[] = { void CJabberProto::OnIqResultCapsDiscoInfoSI(HXML, CJabberIqInfo* pInfo)
{
JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID(pInfo->GetFrom());
- if ( !r)
+ if (r == NULL)
return;
if (r->szCapsNode == NULL)
@@ -149,11 +149,12 @@ void CJabberProto::OnIqResultCapsDiscoInfo(HXML, CJabberIqInfo* pInfo) if (!featureName)
continue;
- for (int j = 0; g_JabberFeatCapPairs[j].szFeature; j++)
+ for (int j = 0; g_JabberFeatCapPairs[j].szFeature; j++) {
if ( !_tcscmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
jcbCaps |= g_JabberFeatCapPairs[j].jcbCap;
break;
}
+ }
}
// no version info support and no XEP-0115 support?
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 4e5da67049..1e15445539 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -1199,7 +1199,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) if (resource != NULL) {
JABBER_RESOURCE_STATUS *r = item->findResource(resource);
- nick = r && r->nick ? r->nick : resource;
+ nick = (r && r->nick) ? r->nick : resource;
}
else nick = NULL;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index aa906cdc4e..8bf30efaa6 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -1613,7 +1613,7 @@ void CJabberProto::OnIqResultSetBookmarks(HXML iqNode) void CJabberProto::OnIqResultLastActivity(HXML iqNode, CJabberIqInfo* pInfo)
{
JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID(pInfo->m_szFrom);
- if ( !r)
+ if (r == NULL)
return;
time_t lastActivity = -1;
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index 548bfc7fa2..b1e7014a1e 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -260,7 +260,6 @@ int CJabberProto::ListAddResource(JABBER_LIST list, const TCHAR *jid, int status else { // Does not exist, add new resource
bIsNewResource = true;
r = (JABBER_RESOURCE_STATUS*)mir_calloc( sizeof(JABBER_RESOURCE_STATUS));
- memset(r, 0, sizeof(JABBER_RESOURCE_STATUS));
r->status = status;
r->affiliation = AFFILIATION_NONE;
r->role = ROLE_NONE;
|