--- a/libpurple/protocols/jabber/jabber.c Mon Mar 07 06:42:57 2011 +0000
+++ b/libpurple/protocols/jabber/jabber.c Tue Mar 08 02:27:25 2011 +0000
@@ -924,24 +924,25 @@
PurpleConnection *gc = purple_account_get_connection(account);
PurplePresence *presence;
js = gc->proto_data = g_new0(JabberStream, 1);
- username = purple_account_get_username(account);
+ user = g_strdup(purple_account_get_username(account)); /* jabber_id_new doesn't accept "user@domain/" as valid */
- slash = strchr(username, '/');
+ slash = strchr(user, '/'); if (slash && *(slash + 1) == '\0')
- js->user = jabber_id_new(username);
+ js->user = jabber_id_new(user); purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_INVALID_SETTINGS,
/* Destroying the connection will free the JabberStream */
@@ -950,6 +951,7 @@
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_INVALID_SETTINGS,
_("Invalid XMPP ID. Username portion must be set."));
/* Destroying the connection will free the JabberStream */
@@ -958,6 +960,7 @@
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_INVALID_SETTINGS,
_("Invalid XMPP ID. Domain must be set."));
/* Destroying the connection will free the JabberStream */
@@ -968,9 +971,10 @@
/* This is overridden during binding, but we need it here
* in case the server only does legacy non-sasl auth!.
- purple_connection_set_display_name(gc, username);
- js->user_jb = jabber_buddy_find(js, username, TRUE);
+ purple_connection_set_display_name(gc, user); + js->user_jb = jabber_buddy_find(js, user, TRUE); /* This basically *can't* fail, but for good measure... */
purple_connection_error_reason(gc,