summaryrefslogtreecommitdiff
path: root/plugins/Msg_Export
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-09-16 11:50:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-09-16 11:50:15 +0000
commit5161fd3fe53b85f579cfece81e25b562f1fa56ae (patch)
tree3ac6979cd3774351cb68431da64ca014f1170e98 /plugins/Msg_Export
parentce6e5ab03d58151c4eda36d05a8436d337b2d3c0 (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 'plugins/Msg_Export')
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 0c5186a021..68bf7cd7a5 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -1271,11 +1271,6 @@ void ExportDBEventInfo(HANDLE hContact, DBEVENTINFO &dbei )
LPGENT("e-mail :"),
LPGENT("Reason :")};
- /*// test code
- dbei.pBlob = (BYTE*)("\xED\xA8\x29\x09nick\0first\0last\0email");
- dbei.cbBlob = 26;
- */
-
if( dbei.cbBlob < 8 || dbei.cbBlob > 5000 )
{
int n = _sntprintf( szTemp , sizeof( szTemp ) , LPGENT("Invalid Database event received. Type %d, size %d"),dbei.eventType, dbei.cbBlob );
@@ -1287,16 +1282,19 @@ void ExportDBEventInfo(HANDLE hContact, DBEVENTINFO &dbei )
bool bWriteOk = false;
int nStringCount;
- const _TCHAR * pszTitle;
+ const _TCHAR *pszTitle;
+ char *pszCurBlobPos;
if( dbei.eventType == EVENTTYPE_AUTHREQUEST )
{ // request
- //blob is: uin(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ)
+ //blob is: uin(DWORD), hContact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ)
nStringCount = 5;
+ pszCurBlobPos = (char *)dbei.pBlob + sizeof( DWORD )*2;
pszTitle = LPGENT("The following user made an authorization request:");
}
else
{ // Added
//blob is: uin(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
+ pszCurBlobPos = (char *)dbei.pBlob + sizeof(DWORD);
nStringCount = 4;
pszTitle = LPGENT("The following user added you to their contact list:");
}
@@ -1309,8 +1307,7 @@ void ExportDBEventInfo(HANDLE hContact, DBEVENTINFO &dbei )
int n = _sntprintf( szTemp , sizeof( szTemp ) ,_T("%d"), uin );
if( bWriteTextToFile( hFile , szTemp , bWriteUTF8Format , n ) )
{
- char * pszCurBlobPos = (char *) (dbei.pBlob + sizeof( DWORD ));
- char * pszEnd = (char *) (dbei.pBlob + dbei.cbSize);
+ char *pszEnd = (char *) (dbei.pBlob + dbei.cbSize);
for( int n = 0 ; n < nStringCount && pszCurBlobPos < pszEnd ; n++ )
{
if( *pszCurBlobPos )