summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/clcitems.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-18 14:12:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-18 14:12:13 +0000
commit81337e86426dd4a79836554342bdc2e7e6195769 (patch)
tree4854edef6130b994f3611eb1a035b5de8b37f5cc /plugins/Clist_nicer/src/clcitems.cpp
parent4f14e4f86d5855d75c0941f9b8495e5a2e522087 (diff)
massive extinction of stupid service name's buffers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/clcitems.cpp')
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index ebb3a8c3d8..6bc3a2a65f 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -270,19 +270,15 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
int xStatus;
WPARAM xStatus2;
TCHAR xStatusName[128];
- char szServiceName[128];
- mir_snprintf(szServiceName, 128, "%s%s", szProto, PS_GETCUSTOMSTATUSEX);
-
- CUSTOM_STATUS cst = {0};
- cst.cbSize = sizeof(CUSTOM_STATUS);
+ CUSTOM_STATUS cst = { sizeof(cst) };
cst.flags = CSSF_MASK_STATUS;
cst.status = &xStatus;
- if (ServiceExists(szServiceName) && !CallService(szServiceName, (WPARAM)hContact, (LPARAM)&cst) && xStatus > 0) {
+ if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst) && xStatus > 0) {
cst.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
cst.wParam = &xStatus2;
cst.ptszName = xStatusName;
- if ( !CallService(szServiceName, (WPARAM)hContact, (LPARAM)&cst)) {
+ if ( !CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst)) {
TCHAR *szwXstatusName = TranslateTS(xStatusName);
p->statusMsg = (TCHAR *)realloc(p->statusMsg, (lstrlen(szwXstatusName) + 2) * sizeof(TCHAR));
_tcsncpy(p->statusMsg, szwXstatusName, lstrlen(szwXstatusName) + 1);