diff options
author | George Hazan <george.hazan@gmail.com> | 2014-10-04 14:12:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-10-04 14:12:16 +0000 |
commit | 9a942c19b93060396982b19a665a231e11324ebf (patch) | |
tree | 3181409249578a3c4c9739483a1eb97cd644b546 /protocols/JabberG | |
parent | 87cae0ab16baff67784eabfa41464bb598204b13 (diff) |
Jabber:
- fix for a very rare crash with Jabber info frame;
- unused vavriables removed;
git-svn-id: http://svn.miranda-ng.org/main/trunk@10687 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber.h | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.h | 7 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 2 |
6 files changed, 8 insertions, 18 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 43047a495b..3dfa48c3e9 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -35,7 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HINSTANCE hInst;
int hLangpack;
-bool g_bShutdown = false;
int g_cbCountries;
CountryListEntry *g_countries;
@@ -160,12 +159,6 @@ static int OnModulesLoaded(WPARAM, LPARAM) return 0;
}
-static int OnPreShutdown(WPARAM, LPARAM)
-{
- g_bShutdown = true;
- return 0;
-}
-
///////////////////////////////////////////////////////////////////////////////
// OnLoad - initialize the plugin instance
@@ -225,7 +218,6 @@ extern "C" int __declspec(dllexport) Load() hExtraMood = ExtraIcon_Register("mood", LPGEN("Jabber Mood"), "jabber_contemplative");
g_MenuInit();
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
JabberUserInfoInit();
return 0;
}
diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index 899d38db96..9c5e921603 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -584,8 +584,6 @@ extern HANDLE hExtraActivity; extern TCHAR szCoreVersion[];
-extern bool g_bShutdown;
-
extern int g_cbCountries;
extern struct CountryListEntry* g_countries;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 814e89c404..16b99d610d 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -50,7 +50,7 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) xmlGetAttrValue(identity, _T("name")) };
if (!lstrcmp(tmp.category, _T("pubsub")) && !lstrcmp(tmp.type, _T("pep"))) {
- m_bPepSupported = TRUE;
+ m_bPepSupported = true;
EnableMenuItems(TRUE);
RebuildInfoFrame();
@@ -187,7 +187,7 @@ void CJabberProto::OnLoggedIn() XmlNodeIq( AddIQ(&CJabberProto::OnIqResultDiscoBookmarks, JABBER_IQ_TYPE_GET))
<< XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(_T("storage"), _T("storage:bookmarks")));
- m_bPepSupported = FALSE;
+ m_bPepSupported = false;
m_ThreadInfo->jabberServerCaps = JABBER_RESOURCE_CAPS_NONE;
m_ThreadInfo->send(
@@ -510,7 +510,6 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) EnableMenuItems(TRUE);
debugLogA("Status changed via THREADSTART");
- m_bModeMsgStatusChangePending = FALSE;
SetServerStatus(m_iDesiredStatus);
if (m_options.AutoJoinConferences)
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 117ae4d242..44326b7a58 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -268,6 +268,8 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM) int __cdecl CJabberProto::OnPreShutdown(WPARAM, LPARAM)
{
+ m_bShutdown = true;
+
UI_SAFE_CLOSE_HWND(m_hwndAgentRegInput);
UI_SAFE_CLOSE_HWND(m_hwndRegProgress);
UI_SAFE_CLOSE_HWND(m_hwndMucVoiceList);
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 22eccdc0a3..522f3546da 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -170,11 +170,10 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface mir_cs m_csModeMsgMutex;
JABBER_MODEMSGS m_modeMsgs;
- BOOL m_bModeMsgStatusChangePending;
- BOOL m_bChangeStatusMessageOnly;
- BOOL m_bSendKeepAlive;
- BOOL m_bPepSupported;
+ bool m_bShutdown;
+ bool m_bSendKeepAlive;
+ bool m_bPepSupported;
HWND m_hwndAgentRegInput;
HWND m_hwndRegProgress;
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index d9a5a0695e..f430aabe00 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -950,7 +950,7 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param) void CJabberProto::RebuildInfoFrame()
{
- if (!g_bShutdown)
+ if (!m_bShutdown)
CallFunctionAsync(sttRebuildInfoFrameApcProc, this);
}
|