diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-16 11:50:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-16 11:50:15 +0000 |
commit | 5161fd3fe53b85f579cfece81e25b562f1fa56ae (patch) | |
tree | 3ac6979cd3774351cb68431da64ca014f1170e98 /protocols/MRA | |
parent | ce6e5ab03d58151c4eda36d05a8436d337b2d3c0 (diff) |
- event code standardization for protocols
- fix for EVENTTYPE_AUTHREQUEST processing
- protocols' custom CallService core removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@1576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA')
-rw-r--r-- | protocols/MRA/MraProto.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/protocols/MRA/MraProto.cpp b/protocols/MRA/MraProto.cpp index 5ee6c3bbd1..7be880f92f 100644 --- a/protocols/MRA/MraProto.cpp +++ b/protocols/MRA/MraProto.cpp @@ -273,7 +273,7 @@ HANDLE CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) !strcmp(dbei.szModule, m_szModuleName) &&
(dbei.eventType == EVENTTYPE_AUTHREQUEST || dbei.eventType == EVENTTYPE_CONTACTS)) {
- char *nick = (char*)(dbei.pBlob + sizeof(DWORD)+ sizeof(HANDLE));
+ char *nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
char *firstName = nick + strlen(nick) + 1;
char *lastName = firstName + strlen(firstName) + 1;
char *email = lastName + strlen(lastName) + 1;
@@ -342,16 +342,7 @@ int CMraProto::AuthDeny(HANDLE hDBEvent, const TCHAR* szReason) int CMraProto::AuthRecv(HANDLE hContact, PROTORECVEVENT* pre)
{
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof(dbei);
- dbei.szModule = m_szModuleName;
- dbei.timestamp = pre->timestamp;
- dbei.flags = (pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0;
- dbei.eventType = EVENTTYPE_AUTHREQUEST;
- dbei.cbBlob = pre->lParam;
- dbei.pBlob = (PBYTE)pre->szMessage;
- CallService(MS_DB_EVENT_ADD, (WPARAM)NULL, (LPARAM)&dbei);
- return 0;
+ return Proto_AuthRecv(m_szModuleName, pre);
}
int CMraProto::AuthRequest(HANDLE hContact, const TCHAR *lptszMessage)
@@ -507,15 +498,12 @@ int CMraProto::RecvContacts(HANDLE hContact, PROTORECVEVENT* pre) int CMraProto::RecvFile(HANDLE hContact, PROTORECVFILET *pre)
{
- CallService(MS_PROTO_RECVFILET, 0, (LPARAM)pre);
- return 0;
+ return Proto_RecvFile(hContact, pre);
}
int CMraProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
{
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)pre };
- CallService(MS_PROTO_RECVMSG, 0, (LPARAM)&ccs);
- return 0;
+ return Proto_RecvMessage(hContact, pre);
}
/////////////////////////////////////////////////////////////////////////////////////////
|