Fix JID case issue with OTR, v2 (franky)
authorMikael Berthe <mikael@lilotux.net>
Tue, 24 Jun 2008 19:17:26 +0200
changeset 1495 6f5754f86fbb
parent 1494 ff0ed873ec19
child 1496 b9f8c1fddb23
Fix JID case issue with OTR, v2 (franky)
mcabber/src/otr.c
--- 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)