summaryrefslogtreecommitdiff
path: root/MirOTR/otr.cpp
diff options
context:
space:
mode:
authoradmin@progandy.co.cc <admin@progandy.co.cc@eced67a3-f377-a0ae-92ae-d6de1850b05a>2010-09-12 13:33:13 +0000
committeradmin@progandy.co.cc <admin@progandy.co.cc@eced67a3-f377-a0ae-92ae-d6de1850b05a>2010-09-12 13:33:13 +0000
commit8411617ad832612d074884ce7304516fe2459b48 (patch)
treea02d6d93c88418524972346284f6738420f9efc5 /MirOTR/otr.cpp
parent2ef110b55c664e80dddca099f1376c874f28fbc9 (diff)
- [ issue 2 ] implemented SMP
- fixed some memory leaks - ugly workaround for SMP in ICQ git-svn-id: http://mirotr.googlecode.com/svn/trunk@8 eced67a3-f377-a0ae-92ae-d6de1850b05a
Diffstat (limited to 'MirOTR/otr.cpp')
-rw-r--r--MirOTR/otr.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/MirOTR/otr.cpp b/MirOTR/otr.cpp
index f409e03..eb6728c 100644
--- a/MirOTR/otr.cpp
+++ b/MirOTR/otr.cpp
@@ -108,7 +108,7 @@ extern "C" {
//QueueUserAPC(newKeyAPC, Global::mainThread, (DWORD)nkd);
if (opdata) protocol = contact_get_proto((HANDLE)opdata);
if (!protocol) return;
- DialogBoxParamW(hInst, MAKEINTRESOURCE(IDD_GENKEYNOTIFY), 0, GenKeyDlgFunc, (LPARAM)protocol );
+ DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_GENKEYNOTIFY), 0, GenKeyDlgFunc, (LPARAM)protocol );
}
@@ -314,8 +314,11 @@ extern "C" {
}
int max_message_size(void *opdata, ConnContext *context) {
- int s = CallProtoService(context->protocol, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, 0);
- return s;
+ // ugly wokaround for ICQ. ICQ protocol reports more than 7k, but in SMP this is too long.
+ // possibly ICQ doesn't allow single words without spaces to become longer than ~2340?
+ if (strcmp("ICQ", context->protocol)==0 || strncmp("ICQ_", context->protocol, 4)==0)
+ return 2340;
+ return CallProtoService(context->protocol, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)context->app_data);
}
const char *account_name(void *opdata, const char *account, const char *protocol) {