summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_iq_handlers.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-20 18:37:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-20 18:37:03 +0000
commit4ad5767f652e0ffd3ebf7df8d8f62a682277faa1 (patch)
tree009f4d4267d0d4e451b74140125b5816701860fb /protocols/JabberG/src/jabber_iq_handlers.cpp
parent8761e793032de3e266a0cb9582327367c6172467 (diff)
- numerous fixes for ineffective xmlGetText() calls;
- common picture type detection code extracted to the separate function; - code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@5431 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_iq_handlers.cpp')
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index 962c864237..cd16f466a9 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -477,7 +477,7 @@ BOOL CJabberProto::OnIqRequestAvatar(HXML, CJabberIqInfo *pInfo)
if (pictureType == PA_FORMAT_UNKNOWN)
return TRUE;
- TCHAR* szMimeType;
+ TCHAR *szMimeType;
switch(pictureType) {
case PA_FORMAT_JPEG: szMimeType = _T("image/jpeg"); break;
case PA_FORMAT_GIF: szMimeType = _T("image/gif"); break;
@@ -532,17 +532,17 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
// RFC 3921 #7.2 Business Rules
if (pInfo->GetFrom()) {
- TCHAR* szFrom = JabberPrepareJid(pInfo->GetFrom());
+ TCHAR *szFrom = JabberPrepareJid(pInfo->GetFrom());
if ( !szFrom)
return TRUE;
- TCHAR* szTo = JabberPrepareJid(m_ThreadInfo->fullJID);
+ TCHAR *szTo = JabberPrepareJid(m_ThreadInfo->fullJID);
if ( !szTo) {
mir_free(szFrom);
return TRUE;
}
- TCHAR* pDelimiter = _tcschr(szFrom, _T('/'));
+ TCHAR *pDelimiter = _tcschr(szFrom, _T('/'));
if (pDelimiter) *pDelimiter = _T('\0');
pDelimiter = _tcschr(szTo, _T('/'));
@@ -563,7 +563,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
JABBER_LIST_ITEM *item;
HANDLE hContact = NULL;
const TCHAR *jid, *str, *name;
- TCHAR* nick;
+ TCHAR *nick;
Log("<iq/> Got roster push, query has %d children", xmlGetChildCount(queryNode));
for (int i=0; ; i++) {
@@ -590,7 +590,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
replaceStrT(item->nick, nick);
HXML groupNode = xmlGetChild(itemNode , "group");
- replaceStrT(item->group, (groupNode) ? xmlGetText(groupNode) : NULL);
+ replaceStrT(item->group, xmlGetText(groupNode));
if ((hContact=HContactFromJID(jid, 0)) == NULL) {
// Received roster has a new JID.
@@ -699,13 +699,13 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo)
ft->iqId = mir_tstrdup(pInfo->GetIdStr());
if (ft->httpHostName && ft->httpPath) {
- TCHAR* desc = NULL;
+ TCHAR *desc = NULL;
Log("Host=%s Port=%d Path=%s", ft->httpHostName, ft->httpPort, ft->httpPath);
if ((n = xmlGetChild(pInfo->GetChildNode(), "desc")) != NULL)
desc = (TCHAR*)xmlGetText(n);
- TCHAR* str2;
+ TCHAR *str2;
Log("description = %s", desc);
if ((str2 = _tcsrchr(ft->httpPath, '/')) != NULL)
str2++;