diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-20 19:31:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-20 19:31:57 +0000 |
commit | 14877a748010cf73448cc6892792120e4b191439 (patch) | |
tree | 0f433ab5b6daaed39e42265227c35dc951558d8b /protocols/JabberG/src/jabber_menu.cpp | |
parent | 6a7f572f84f3f23b55ab0f42c1203035463c38d8 (diff) |
Jabber:
- JABBER_RESOURCE_STATUS became a class;
- static item JABBER_LIST_ITEM::itemResource converted into a dynamically allocated structure for resourceless items only;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@6144 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_menu.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 174e571571..7b47dcf4a3 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -587,7 +587,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM) JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid.ptszVal);
if (item != NULL) {
XmlNode p(_T("presence")); xmlAddAttr(p, _T("to"), item->jid);
- if (item->itemResource.status == ID_STATUS_ONLINE)
+ if (item->m_pItemResource->status == ID_STATUS_ONLINE)
xmlAddAttr(p, _T("type"), _T("unavailable"));
m_ThreadInfo->send(p);
}
@@ -1032,9 +1032,11 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) WindowList_Add(hDialogsList, event->hwndWindow, event->hContact);
ptrT jid( getTStringA(event->hContact, "jid"));
- JABBER_LIST_ITEM *pItem = (jid == NULL) ? NULL : ListGetItemPtr(LIST_ROSTER, jid);
- if (pItem && (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_ARCHIVE_AUTO) && m_options.EnableMsgArchive)
- RetrieveMessageArchive(event->hContact, pItem);
+ if (jid != NULL) {
+ JABBER_LIST_ITEM *pItem = ListGetItemPtr(LIST_ROSTER, jid);
+ if (pItem && (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_ARCHIVE_AUTO) && m_options.EnableMsgArchive)
+ RetrieveMessageArchive(event->hContact, pItem);
+ }
}
else if (event->uType == MSG_WINDOW_EVT_CLOSING) {
if (hDialogsList)
@@ -1045,7 +1047,8 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) if ( !db_get(event->hContact, "SRMsg", "SupportTyping", &dbv)) {
bSupportTyping = dbv.bVal == 1;
db_free(&dbv);
- } else if ( !db_get(NULL, "SRMsg", "DefaultTyping", &dbv)) {
+ }
+ else if ( !db_get(NULL, "SRMsg", "DefaultTyping", &dbv)) {
bSupportTyping = dbv.bVal == 1;
db_free(&dbv);
}
|