summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_agent.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-02 19:38:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-02 19:38:44 +0000
commit8fecb411c56387ef6db40abe96b8c935fddc6083 (patch)
tree3aee9abef3610ab248bba34af1bd4878038d130f /protocols/JabberG/src/jabber_agent.cpp
parentf7e58cf1bf50928ae22ffbdd9de99844407d5780 (diff)
atavism extincted: old nasty IQ handler mechanism
git-svn-id: http://svn.miranda-ng.org/main/trunk@6312 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_agent.cpp')
-rw-r--r--protocols/JabberG/src/jabber_agent.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_agent.cpp b/protocols/JabberG/src/jabber_agent.cpp
index c448cee0c7..bc0a3d7e3a 100644
--- a/protocols/JabberG/src/jabber_agent.cpp
+++ b/protocols/JabberG/src/jabber_agent.cpp
@@ -101,9 +101,9 @@ public:
SetDlgItemText(m_hwnd, IDC_SUBMIT, TranslateT("Register"));
SetDlgItemText(m_hwnd, IDC_FRAME_TEXT, TranslateT("Please wait..."));
- int iqId = m_proto->SerialNext();
- m_proto->IqAdd(iqId, IQ_PROC_GETREGISTER, &CJabberProto::OnIqResultGetRegister);
- m_proto->m_ThreadInfo->send( XmlNodeIq(_T("get"), iqId, m_jid) << XQUERY(JABBER_FEAT_REGISTER));
+ m_proto->m_ThreadInfo->send(
+ XmlNodeIq( m_proto->AddIQ(&CJabberProto::OnIqResultGetRegister, JABBER_IQ_TYPE_GET, m_jid))
+ << XQUERY(JABBER_FEAT_REGISTER));
// Enable WS_EX_CONTROLPARENT on IDC_FRAME (so tab stop goes through all its children)
LONG frameExStyle = GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_FRAME), GWL_EXSTYLE);
@@ -233,10 +233,7 @@ public:
TCHAR *str2 = (TCHAR*)alloca(sizeof(TCHAR) * 128);
int id = 0;
- int iqId = m_proto->SerialNext();
- m_proto->IqAdd(iqId, IQ_PROC_SETREGISTER, &CJabberProto::OnIqResultSetRegister);
-
- XmlNodeIq iq(_T("set"), iqId, from);
+ XmlNodeIq iq( m_proto->AddIQ(&CJabberProto::OnIqResultSetRegister, JABBER_IQ_TYPE_SET, from));
HXML query = iq << XQUERY(JABBER_FEAT_REGISTER);
if ((xNode = xmlGetChild(queryNode , "x")) != NULL) {