summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-10 14:27:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-10 14:27:45 +0000
commit97eb95cd8aecd628d82d3aee30b81e567beb7754 (patch)
treeada84b3b7b20bc1f5ab6b490286ab1d41529108f /protocols/JabberG/src/jabber_misc.cpp
parent3bcc4ebb3e1a43574fb934a80903feaa56642089 (diff)
almost all old helpers replaced with smart pointers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5307 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_misc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index dbe400af80..b04bba1ad1 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -278,16 +278,13 @@ void CJabberProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbL
if (hContact != NULL) {
char str[ 256 ];
DBVARIANT dbv;
- if ( !JGetStringUtf(hContact, "jid", &dbv)) {
+ if ( !db_get_utf(hContact, m_szModuleName, "jid", &dbv)) {
strncpy(str, dbv.pszVal, sizeof str);
str[ sizeof(str)-1 ] = 0;
db_free(&dbv);
}
else _i64toa((LONG_PTR)hContact, str, 10);
-
- char* hash = JabberSha1(str);
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S.%S"), hash, szFileType);
- mir_free(hash);
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S.%S"), ptrA(JabberSha1(str)), szFileType);
}
else if (m_ThreadInfo != NULL) {
mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%s@%S avatar.%S"),