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-15 18:01:16 +0000
committeradmin@progandy.co.cc <admin@progandy.co.cc@eced67a3-f377-a0ae-92ae-d6de1850b05a>2010-09-15 18:01:16 +0000
commit9ff42f0ce72e234de4ab575cb48ca7fa4a9992c7 (patch)
tree5541aad1b1bb4eca381977f1096ac2706ca1a396 /MirOTR/otr.cpp
parentfa7c6913dd96ba0282af7b5be85213bb1ce32efa (diff)
- fixed crash in Jabber. maybe other protocls were affected, too.
- added basic html conversion for outgoing data - fixed html conversion for incoming data git-svn-id: http://mirotr.googlecode.com/svn/trunk@14 eced67a3-f377-a0ae-92ae-d6de1850b05a
Diffstat (limited to 'MirOTR/otr.cpp')
-rw-r--r--MirOTR/otr.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/MirOTR/otr.cpp b/MirOTR/otr.cpp
index 98ac2a3..f8cc502 100644
--- a/MirOTR/otr.cpp
+++ b/MirOTR/otr.cpp
@@ -319,11 +319,16 @@ extern "C" {
}
int max_message_size(void *opdata, ConnContext *context) {
+ const char *proto;
+ if (context && context->protocol)
+ proto = context->protocol;
+ else
+ proto = contact_get_proto(opdata);
// 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)
+ if (strcmp("ICQ", proto)==0 || strncmp("ICQ_", proto, 4)==0)
return 2340;
- return CallProtoService(context->protocol, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)context->app_data);
+ return CallProtoService(proto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)opdata);
}
const char *account_name(void *opdata, const char *account, const char *protocol) {