diff -r 5ae15cfc1bee -r d567f89d6a9b libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sun Oct 09 02:20:18 2022 -0500 +++ b/libpurple/protocols/jabber/jabber.c Sun Oct 09 04:43:37 2022 -0500 @@ -1003,17 +1003,21 @@ } } -static void -jabber_login(G_GNUC_UNUSED PurpleProtocol *protocol, PurpleAccount *account) { - PurpleConnection *gc = purple_account_get_connection(account); +static PurpleConnection * +jabber_login(G_GNUC_UNUSED PurpleProtocol *protocol, PurpleAccount *account, + const char *password) +{ + PurpleConnection *gc = NULL; JabberStream *js; PurpleImage *image; + gc = purple_connection_new(protocol, account, password); + purple_connection_set_flags(gc, PURPLE_CONNECTION_FLAG_HTML | PURPLE_CONNECTION_FLAG_NO_IMAGES); js = jabber_stream_new(account); if (js == NULL) - return; + return gc; /* replace old default proxies with the new default: NULL * TODO: these can eventually be removed */ @@ -1037,6 +1041,8 @@ } jabber_stream_connect(js); + + return gc; } @@ -1493,9 +1499,12 @@ JabberStream *js; if (purple_connection_get_state(gc) != PURPLE_CONNECTION_CONNECTED) { + #warning fix registration and unregistration + #if 0 if (purple_connection_get_state(gc) != PURPLE_CONNECTION_CONNECTING) { jabber_login(PURPLE_PROTOCOL(protocol_server), account); } + #endif js = purple_connection_get_protocol_data(gc); js->unregistration = TRUE;