summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-30 18:16:36 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-30 18:16:36 +0000
commit19642942fd8e581f1de04961a85af87b98b9d9c7 (patch)
treec00bf1d407a48f8975903a751fd156a75a070293 /plugins
parent8c85373fcb86aae9a09e19cae045fa667ba929a4 (diff)
ugh... better a clutch, than a crash
git-svn-id: http://svn.miranda-ng.org/main/trunk@2568 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MetaContacts/src/meta_services.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp
index 03c154c430..4e491b50f6 100644
--- a/plugins/MetaContacts/src/meta_services.cpp
+++ b/plugins/MetaContacts/src/meta_services.cpp
@@ -490,15 +490,16 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam)
// use the subcontact's protocol to add the db if possible (AIMOSCAR removes HTML here!)
HANDLE most_online = Meta_GetMostOnline(ccs->hContact);
char *proto = GetContactProto(most_online);
- if (proto)
- if ( CallProtoService(proto, PSR_MESSAGE, (WPARAM)ccs->hContact, (LPARAM)pre) != CALLSERVICE_NOTFOUND)
+ if (proto) {
+ char service[256];
+ mir_snprintf(service, 256, "%s%s", proto, PSR_MESSAGE);
+ if (CallService(service, wParam, lParam) != CALLSERVICE_NOTFOUND)
return 0;
+ }
}
-
// otherwise, add event to db directly
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = META_PROTO;
dbei.timestamp = pre->timestamp;
dbei.flags = (pre->flags & PREF_CREATEREAD ? DBEF_READ : 0);
@@ -509,14 +510,11 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam)
if ( pre->flags & PREF_UNICODE )
dbei.cbBlob *= ( sizeof( wchar_t )+1 );
dbei.pBlob = (PBYTE) pre->szMessage;
-
CallService(MS_DB_EVENT_ADD, (WPARAM) ccs->hContact, (LPARAM)&dbei);
-
return 0;
}
-
/** Called when an ACK is received.
*
* Retransmit the ACK sent by a simple contact so that it