summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_agent.cpp
diff options
context:
space:
mode:
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) {