summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_iqid.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-15 08:51:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-15 08:51:43 +0000
commitd11d4a6de1a3ec00021bc7772a64821032b33250 (patch)
treeda6aa5d36ea6bcad426ab60e8c94648c33ec84c9 /protocols/JabberG/src/jabber_iqid.cpp
parentc68165979e5741aa201a9ac951e37fee4ca362cc (diff)
- custom sha1 engine removed from GG;
- minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@5700 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid.cpp')
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index ea759258f5..9c17f9bd8b 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -1474,22 +1474,22 @@ LBL_ErrFormat:
setByte(hContact, "AvatarType", pictureType);
- char buffer[41];
mir_sha1_byte_t digest[20];
mir_sha1_ctx sha;
mir_sha1_init(&sha);
mir_sha1_append(&sha, (mir_sha1_byte_t*)(char*)body, resultLen);
mir_sha1_finish(&sha, digest);
- bin2hex(digest, sizeof(digest), buffer);
GetAvatarFileName(hContact, tszFileName, SIZEOF(tszFileName));
_tcsncpy(AI.filename, tszFileName, SIZEOF(AI.filename));
- FILE* out = _tfopen(tszFileName, _T("wb"));
+ FILE *out = _tfopen(tszFileName, _T("wb"));
if (out != NULL) {
fwrite(body, resultLen, 1, out);
fclose(out);
- setString(hContact, "AvatarSaved", buffer);
+
+ char buffer[41];
+ setString(hContact, "AvatarSaved", bin2hex(digest, sizeof(digest), buffer));
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&AI), NULL);
Log("Broadcast new avatar: %s",AI.filename);
}