# HG changeset patch # User Evan Schoenberg # Date 1209768674 0 # Node ID 42dfa1139b5cd680408e8e45c10de238c9921f62 # Parent d5b3afea87640b239631a447ac9420cb6acaf826# Parent 0d7ceae153bdc10460befbff6f5398900370c265 merge of '21d37789f674809d615fc7676a092f1da438b0f5' and 'aafbbc317ab5f69e31e0bb6cabc264bb70745ef2' diff -r 0d7ceae153bd -r 42dfa1139b5c configure.ac diff -r 0d7ceae153bd -r 42dfa1139b5c libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Fri May 02 22:01:01 2008 +0000 +++ b/libpurple/protocols/jabber/auth.c Fri May 02 22:51:14 2008 +0000 @@ -382,6 +382,10 @@ if ((pos = strstr(js->sasl_mechs->str, js->current_mech))) { g_string_erase(js->sasl_mechs, pos-js->sasl_mechs->str, strlen(js->current_mech)); } + /* Remove space which separated this mech from the next */ + if (strlen(js->sasl_mechs->str) > 0 && ((js->sasl_mechs->str)[0] == ' ')) { + g_string_erase(js->sasl_mechs, 0, 1); + } again = TRUE; } @@ -1112,12 +1116,18 @@ if ((pos = strstr(js->sasl_mechs->str, js->current_mech))) { g_string_erase(js->sasl_mechs, pos-js->sasl_mechs->str, strlen(js->current_mech)); } + /* Remove space which separated this mech from the next */ + if (strlen(js->sasl_mechs->str) > 0 && ((js->sasl_mechs->str)[0] == ' ')) { + g_string_erase(js->sasl_mechs, 0, 1); + } } - - sasl_dispose(&js->sasl); - - jabber_auth_start_cyrus(js); - return; + if (strlen(js->sasl_mechs->str)) { + /* If we have remaining mechs to try, do so */ + sasl_dispose(&js->sasl); + + jabber_auth_start_cyrus(js); + return; + } } #endif msg = jabber_parse_error(js, packet, &reason);