cpw.darkrain42.xmpp.scram: 0a951f47: jabber: Should have looked for this func...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Mon Nov 30 23:25:52 EST 2009
-----------------------------------------------------------------
Revision: 0a951f474397791a42327c3a033585bd3e8c67bc
Ancestor: 2e88b43afbb6ca34ee9bbcc96745b635867344a3
Author: darkrain42 at pidgin.im
Date: 2009-12-01T00:30:22
Branch: im.pidgin.cpw.darkrain42.xmpp.scram
URL: http://d.pidgin.im/viewmtn/revision/info/0a951f474397791a42327c3a033585bd3e8c67bc
Modified files:
libpurple/protocols/jabber/auth_scram.c
ChangeLog:
jabber: Should have looked for this function earlier.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth_scram.c 3e6bf8ce68e3778cc331cdcb4aa75483001fa53d
+++ libpurple/protocols/jabber/auth_scram.c 3c8722f9867dc069ac9c35d7ad737ecf33e0561b
@@ -363,21 +363,12 @@ static gchar *escape_username(const gcha
static gchar *escape_username(const gchar *in)
{
- GString *s = g_string_new(in);
- gchar *c;
- gsize i = 0;
+ gchar *tmp, *tmp2;
- c = s->str;
- while (*c) {
- if (*c == ',' || *c == '=') {
- g_string_erase(s, i, 1);
- g_string_insert(s, i, *c == ',' ? "=2C" : "=3D");
- }
-
- ++c; ++i;
- }
-
- return g_string_free(s, FALSE);
+ tmp = purple_strreplace(in, "=", "=3D");
+ tmp2 = purple_strreplace(tmp, ",", "=2D");
+ g_free(tmp);
+ return tmp2;
}
static xmlnode *scram_start(JabberStream *js, xmlnode *mechanisms)
More information about the Commits
mailing list