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_proto.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_proto.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 44326b7a58..47bda82b1c 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -303,23 +303,15 @@ int __cdecl CJabberProto::OnPreShutdown(WPARAM, LPARAM) MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
{
- MCONTACT hContact;
- TCHAR *jid, *nick;
-
debugLog(_T("AddToListByJID jid = %s"), newJid);
- if ((hContact=HContactFromJID(newJid)) == NULL) {
+ MCONTACT hContact = HContactFromJID(newJid);
+ if (hContact == NULL) {
// not already there: add
- jid = mir_tstrdup(newJid);
- debugLog(_T("Add new jid to contact jid = %s"), jid);
+ debugLog(_T("Add new jid to contact jid = %s"), newJid);
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
- setTString(hContact, "jid", jid);
- if ((nick=JabberNickFromJID(newJid)) == NULL)
- nick = mir_tstrdup(newJid);
-
- mir_free(nick);
- mir_free(jid);
+ setTString(hContact, "jid", newJid);
// Note that by removing or disable the "NotOnList" will trigger
// the plugin to add a particular contact to the roster list.
|