summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/image.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 17:38:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 17:38:49 +0000
commit5e9e63c45e37917ffb0acd83832d0d8f99d01883 (patch)
tree1b674b85b1f582a13bd2a57ec73377b8989141bc /protocols/Gadu-Gadu/src/image.cpp
parent7105dcf75bdd939ca52ba045bc29c536c3f7ba49 (diff)
new macroses for MS_PROTO_CHAINRECV: ProtoChainRecv, ProtoChainRecvMsg & ProtoChainRecvFile
git-svn-id: http://svn.miranda-ng.org/main/trunk@2540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/image.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 9a6b934054..22d1f7fe14 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -851,18 +851,12 @@ int GGPROTO::img_displayasmsg(HANDLE hContact, void *img)
if (res != 0) {
char image_msg[MAX_PATH + 11];
- CCSDATA ccs = {0};
- PROTORECVEVENT pre = {0};
+ mir_snprintf(image_msg, SIZEOF(image_msg), "[img]%s[/img]", (char*)_T2A(szPath));
- ccs.szProtoService = PSR_MESSAGE;
- ccs.hContact = hContact;
- ccs.lParam = (LPARAM)&pre;
- char* szPathA = mir_t2a(szPath);
- mir_snprintf(image_msg, SIZEOF(image_msg), "[img]%s[/img]", szPathA);
- mir_free(szPathA);
+ PROTORECVEVENT pre = {0};
pre.timestamp = time(NULL);
pre.szMessage = image_msg;
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
+ ProtoChainRecvMsg(hContact, &pre);
netlog("img_displayasmsg(): Image saved to %s.", szPath);
}
else