Converted these images to PNG, saving a handful of bytes per image
[adiumx.git] / Utilities / dep-build-scripts / libpurple_jabber_avoid_sasl_option_hack.diff
blob7a7b82f36463cdce40f9ff9b89f1c7a4606b75ac
1 --- libpurple/protocols/jabber/auth.c 2007-12-22 10:53:25.000000000 -0600
2 +++ auth.c 2007-12-27 21:33:53.000000000 -0600
3 @@ -414,6 +414,31 @@ static void jabber_auth_start_cyrus(Jabb
4 js->sasl = NULL;
7 + if (mech && (strcmp(mech, "PLAIN") == 0) && purple_prefs_get_bool("/plugins/prpl/jabber/avoid_sasl_for_plain_auth")) {
8 + js->auth_type = JABBER_AUTH_PLAIN;
9 + js->sasl_state = SASL_OK;
10 + sasl_dispose(&js->sasl);
11 + js->sasl = NULL;
13 + if(js->gsc == NULL && !purple_account_get_bool(js->gc->account, "auth_plain_in_clear", FALSE)) {
14 + char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"),
15 + js->gc->account->username);
16 + purple_request_yes_no(js->gc, _("Plaintext Authentication"),
17 + _("Plaintext Authentication"),
18 + msg,
19 + 2,
20 + purple_connection_get_account(js->gc), NULL, NULL,
21 + purple_connection_get_account(js->gc), allow_plaintext_auth,
22 + disallow_plaintext_auth);
23 + g_free(msg);
24 + return;
25 + }
26 + finish_plaintext_authentication(js);
28 + xmlnode_free(auth);
29 + return;
30 + }
32 jabber_send(js, auth);
33 xmlnode_free(auth);
34 } else {
35 @@ -1077,10 +1077,12 @@ void jabber_auth_handle_success(JabberSt
38 /* If we've negotiated a security layer, we need to enable it */
39 - sasl_getprop(js->sasl, SASL_SSF, &x);
40 - if (*(int *)x > 0) {
41 - sasl_getprop(js->sasl, SASL_MAXOUTBUF, &x);
42 - js->sasl_maxbuf = *(int *)x;
43 + if (js->sasl) {
44 + sasl_getprop(js->sasl, SASL_SSF, &x);
45 + if (*(int *)x > 0) {
46 + sasl_getprop(js->sasl, SASL_MAXOUTBUF, &x);
47 + js->sasl_maxbuf = *(int *)x;
48 + }
50 #endif
52 # old_revision [20e2add42a314b4914e798757eb2a69ac3b491d0]
54 # patch "libpurple/protocols/jabber/libxmpp.c"
55 # from [e90c78b600e55ee816eae95ffc4c0fd69fdd785b]
56 # to [160d7ab1fc2786d398fced4a555eee84b76ced4b]
58 ============================================================
59 --- libpurple/protocols/jabber/libxmpp.c e90c78b600e55ee816eae95ffc4c0fd69fdd785b
60 +++ libpurple/protocols/jabber/libxmpp.c 160d7ab1fc2786d398fced4a555eee84b76ced4b
61 @@ -256,6 +256,10 @@ init_plugin(PurplePlugin *plugin)
62 if ((ret = sasl_client_init(NULL)) != SASL_OK) {
63 purple_debug_error("xmpp", "Error (%d) initializing SASL.\n", ret);
66 + /* Adium hack for Mac OS X 10.4 support */
67 + purple_prefs_add_none("/plugins/prpl/jabber");
68 + purple_prefs_add_bool("/plugins/prpl/jabber/avoid_sasl_for_plain_auth", FALSE);
69 #endif
70 jabber_register_commands();