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_chat.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_chat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index d632de1a22..07edd9ae80 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -123,7 +123,7 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) for (i=0; i < SIZEOF(sttAffiliationItems); i++) sttAffiliationItems[i].translate();
for (i=0; i < SIZEOF(sttRoleItems); i++) sttRoleItems[i].translate();
- TCHAR *szNick = JabberNickFromJID(item->jid);
+ ptrT szNick(JabberNickFromJID(item->jid));
GCSESSION gcw = { sizeof(GCSESSION) };
gcw.iType = GCW_CHATROOM;
@@ -158,7 +158,6 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) setTString(hContact, "Password", item->password);
}
}
- mir_free(szNick);
item->bChatActive = TRUE;
@@ -268,7 +267,7 @@ void CJabberProto::GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const TCHAR * szReason = TranslateT("user banned");
}
- TCHAR *myNick = (item->nick == NULL) ? NULL : mir_tstrdup(item->nick);
+ ptrT myNick(mir_tstrdup(item->nick));
if (myNick == NULL)
myNick = JabberNickFromJID(m_szJabberJID);
@@ -325,8 +324,6 @@ void CJabberProto::GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const TCHAR * gcd.iType = GC_EVENT_SETCONTACTSTATUS;
CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce);
}
-
- mir_free(myNick);
}
void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason)
|