summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-02 21:22:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-02 21:22:46 +0300
commit2347a641948e9082b0e842eb0a8480abdfba09e0 (patch)
treed4e95ad46e51a459ae27263bac5b15ccd310375d /protocols/JabberG
parent6c4c81c02298ba6ab34c85c58f96da92c835f20d (diff)
crash fix in Jabber
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_byte.cpp12
-rw-r--r--protocols/JabberG/src/jabber_iq.h22
2 files changed, 16 insertions, 18 deletions
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp
index c6cd6c33d2..5255a6ba7a 100644
--- a/protocols/JabberG/src/jabber_byte.cpp
+++ b/protocols/JabberG/src/jabber_byte.cpp
@@ -144,7 +144,6 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt)
{
wchar_t szPort[8];
HANDLE hEvent = NULL;
- CJabberIqInfo *pInfo = NULL;
int nIqId = 0;
debugLogA("Thread started: type=bytestream_send");
@@ -161,29 +160,28 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt)
jbt->szProxyJid = NULL;
jbt->hProxyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- pInfo = AddIQ(&CJabberProto::IqResultProxyDiscovery, JABBER_IQ_TYPE_GET, proxyJid, 0, -1, jbt);
+ CJabberIqInfo *pInfo = AddIQ(&CJabberProto::IqResultProxyDiscovery, JABBER_IQ_TYPE_GET, proxyJid, 0, -1, jbt);
nIqId = pInfo->GetIqId();
XmlNodeIq iq(pInfo);
iq << XQUERY(JABBER_FEAT_BYTESTREAMS);
m_ThreadInfo->send(iq);
WaitForSingleObject(jbt->hProxyEvent, INFINITE);
- m_iqManager.ExpireIq (nIqId);
+ m_iqManager.ExpireIq(nIqId);
CloseHandle(jbt->hProxyEvent);
jbt->hProxyEvent = NULL;
if (jbt->state == JBT_ERROR && !bDirect) {
debugLogA("Bytestream proxy failure");
- MsgPopup( pInfo->GetHContact(), TranslateT("Bytestream Proxy not available"), pInfo->GetReceiver());
+ MsgPopup(pInfo->GetHContact(), TranslateT("Bytestream Proxy not available"), proxyJid);
jbt->ft->state = FT_DENIED;
(this->*jbt->pfnFinal)(FALSE, jbt->ft);
jbt->ft = NULL;
delete jbt;
return;
- }
- } }
+ } } }
- pInfo = AddIQ(&CJabberProto::ByteInitiateResult, JABBER_IQ_TYPE_SET, jbt->dstJID, 0, -1, jbt);
+ CJabberIqInfo *pInfo = AddIQ(&CJabberProto::ByteInitiateResult, JABBER_IQ_TYPE_SET, jbt->dstJID, 0, -1, jbt);
nIqId = pInfo->GetIqId();
{
XmlNodeIq iq(pInfo);
diff --git a/protocols/JabberG/src/jabber_iq.h b/protocols/JabberG/src/jabber_iq.h
index a8110ea52c..7b5eb1592f 100644
--- a/protocols/JabberG/src/jabber_iq.h
+++ b/protocols/JabberG/src/jabber_iq.h
@@ -59,19 +59,19 @@ protected:
DWORD m_dwParamsToParse;
DWORD m_dwRequestTime;
DWORD m_dwTimeout;
- wchar_t *m_szReceiver;
+ wchar_t *m_szReceiver;
int m_iPriority;
public:
void *m_pUserData;
int m_nIqType;
- wchar_t *m_szFrom;
- wchar_t *m_szChildTagXmlns;
- wchar_t *m_szChildTagName;
+ wchar_t *m_szFrom;
+ wchar_t *m_szChildTagXmlns;
+ wchar_t *m_szChildTagName;
HXML m_pChildNode;
MCONTACT m_hContact;
- wchar_t *m_szTo;
- wchar_t *m_szId;
+ wchar_t *m_szTo;
+ wchar_t *m_szId;
public:
__forceinline CJabberIqInfo()
@@ -89,13 +89,13 @@ public:
__forceinline DWORD GetRequestTime() const { return m_dwRequestTime; }
__forceinline int GetIqType() const { return m_nIqType; }
__forceinline void* GetUserData() const { return m_pUserData; }
- __forceinline wchar_t* GetFrom() const { return m_szFrom; }
- __forceinline wchar_t* GetTo() const { return m_szTo; }
- __forceinline wchar_t* GetIdStr() const { return m_szId; }
+ __forceinline wchar_t* GetFrom() const { return m_szFrom; }
+ __forceinline wchar_t* GetTo() const { return m_szTo; }
+ __forceinline wchar_t* GetIdStr() const { return m_szId; }
__forceinline MCONTACT GetHContact() const { return m_hContact; }
__forceinline HXML GetChildNode() const { return m_pChildNode; }
- __forceinline wchar_t* GetChildNodeName() const { return m_szChildTagName; }
- __forceinline wchar_t* GetReceiver() const { return m_szReceiver; }
+ __forceinline wchar_t* GetChildNodeName() const { return m_szChildTagName; }
+ __forceinline wchar_t* GetReceiver() const { return m_szReceiver; }
__forceinline int GetPriority() const { return m_iPriority; }
char* GetCharIqType()