diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-27 07:46:37 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-27 07:46:37 +0300 |
commit | 1f4c1f489f05bb135c8df93d40db9bb624be969d (patch) | |
tree | bd214f55f5932a60217a848868b9b4cb6fcd9df1 /utilities.cpp | |
parent | c7417593521a2a96442e97508354e32f502bd931 (diff) |
key autoexchange implementation started
Diffstat (limited to 'utilities.cpp')
-rw-r--r-- | utilities.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/utilities.cpp b/utilities.cpp index 8b52ce2..4a9fadc 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -282,6 +282,8 @@ int onProtoAck(WPARAM w, LPARAM l) PROTOFILETRANSFERSTATUS *f = (PROTOFILETRANSFERSTATUS*) ack->lParam;
if(!f)
f = (PROTOFILETRANSFERSTATUS*) ack->hProcess;
+ if(!f)
+ return 0;
switch(ack->result)
{
@@ -289,12 +291,10 @@ int onProtoAck(WPARAM w, LPARAM l) break;
case ACKRESULT_SUCCESS:
{
- if(sizeof(*f) != sizeof(PROTOFILETRANSFERSTATUS))
- break;
TCHAR *filename = NULL;
- if(f->szCurrentFile)
+ if(f->szCurrentFile && f->szCurrentFile[0])
filename = mir_utf8decodeW(f->szCurrentFile);
- else if(f->tszCurrentFile)
+ else if(f->tszCurrentFile && f->tszCurrentFile[0])
filename = mir_wstrdup(f->tszCurrentFile);
if(!filename)
break;
@@ -811,7 +811,9 @@ void AddHandlers() { (*p)->setPrescenseHandler((*p)->getJabberInterface()->Net()->AddPresenceHandler((JABBER_HANDLER_FUNC)PrescenseHandler)); } - + extern bool bAutoExchange; + if(bAutoExchange) + (*p)->getJabberInterface()->Net()->RegisterFeature(_T("GPG Key Auto Exchange"), _T("Indicates that gpg installed and configured to public key auto exchange (currently implemented in new_gpg Miranda IM plugin)")); } } |