diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-02 18:59:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-02 18:59:02 +0000 |
commit | 7945c8ce16b28888432c26ca4159f918cbb3010f (patch) | |
tree | 7b963eb7af5edc093f8b43e7e723467f2b15dc7c /protocols/JabberG/src/jabber_groupchat.cpp | |
parent | d865fa125a572ebf0d6454cd14721b9b22c3edec (diff) |
JabberNickFromJID usage moved to ptrT
git-svn-id: http://svn.miranda-ng.org/main/trunk@10904 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_groupchat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_groupchat.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 85591044c2..5c8ab6f357 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -842,8 +842,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) // entering room or a usual room presence
if (type == NULL || !_tcscmp(type, _T("available"))) {
- TCHAR *room = JabberNickFromJID(from);
- if (room == NULL)
+ if (ptrT(JabberNickFromJID(from)) == NULL)
return;
GcLogCreate(item);
@@ -943,8 +942,6 @@ void CJabberProto::GroupchatProcessPresence(HXML node) XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetMuc, JABBER_IQ_TYPE_GET, item->jid))
<< XQUERY(JABBER_FEAT_MUC_OWNER));
}
-
- mir_free(room);
}
// leaving room
@@ -1163,9 +1160,7 @@ public: if (m_info->reason != NULL)
SetDlgItemText(m_hwnd, IDC_REASON, m_info->reason);
- TCHAR *myNick = JabberNickFromJID(m_proto->m_szJabberJID);
- SetDlgItemText(m_hwnd, IDC_NICK, myNick);
- mir_free(myNick);
+ SetDlgItemText(m_hwnd, IDC_NICK, ptrT(JabberNickFromJID(m_proto->m_szJabberJID)));
WindowSetIcon(m_hwnd, m_proto, "group");
@@ -1208,11 +1203,7 @@ void CJabberProto::GroupchatProcessInvite(const TCHAR *roomJid, const TCHAR *fro inviteInfo->password = mir_tstrdup(password);
ForkThread((MyThreadFunc)&CJabberProto::GroupchatInviteAcceptThread, inviteInfo);
}
- else {
- TCHAR *myNick = JabberNickFromJID(m_szJabberJID);
- AcceptGroupchatInvite(roomJid, myNick, password);
- mir_free(myNick);
- }
+ else AcceptGroupchatInvite(roomJid, ptrT(JabberNickFromJID(m_szJabberJID)), password);
}
void CJabberProto::AcceptGroupchatInvite(const TCHAR *roomJid, const TCHAR *reason, const TCHAR *password)
|