changeset 1495:6f5754f86fbb

Fix JID case issue with OTR, v2 (franky)
author Mikael Berthe <mikael@lilotux.net>
date Tue, 24 Jun 2008 19:17:26 +0200
parents ff0ed873ec19
children b9f8c1fddb23
files mcabber/src/otr.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/otr.c	Mon May 05 01:22:19 2008 +0200
+++ b/mcabber/src/otr.c	Tue Jun 24 19:17:26 2008 +0200
@@ -197,8 +197,14 @@
 static ConnContext * otr_get_context(const char *buddy)
 {
   int null = 0;
-  return otrl_context_find(userstate, buddy, account, "jabber", 1, &null,
-                           NULL, NULL);
+  ConnContext * ctx;
+  char * lowcasebuddy = g_strdup(buddy);
+
+  mc_strtolower(lowcasebuddy);
+  ctx = otrl_context_find(userstate, lowcasebuddy, account, "jabber", 1, &null,
+                          NULL, NULL);
+  g_free(lowcasebuddy);
+  return ctx;
 }
 
 static void otr_message_disconnect(ConnContext *ctx)