summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp12
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)"));
}
}