Revision 01e79f9c7ec957a574f7f14ad3c02de473d744b9
nwalp at pidgin.im
nwalp at pidgin.im
Sun Mar 4 11:52:48 EST 2007
o -----------------------------------------------------------------
|\ Revision: 01e79f9c7ec957a574f7f14ad3c02de473d744b9
| | Ancestor: 12db4a9e09675b5127f1f310972303177d1b2ca8
| | Ancestor: ad7432a7ea65bcc312ac4541c0cfe777630248f9
| | Author: nwalp at pidgin.im
| | Date: 2007-03-04T16:52:02
| | Branch: im.pidgin.pidgin
| |
| | Modified files:
| | configure.ac console/gntaccount.c
| | libpurple/protocols/jabber/auth.c
| | libpurple/protocols/jabber/jabber.c
| | libpurple/protocols/jabber/jabber.h po/POTFILES.in
| | po/stats.pl
| |
| | ChangeLog:
| |
| | merge of '12db4a9e09675b5127f1f310972303177d1b2ca8'
| | and 'ad7432a7ea65bcc312ac4541c0cfe777630248f9'
| |
| | ============================================================
| | --- configure.ac 2ae6476e2900971bd221ecb697e358be0dcdd8cc
| | +++ configure.ac fb18cf8f85bd9ed11296db2cc5377e2fe230a33f
| | @@ -23,7 +23,7 @@ PKG_PROG_PKG_CONFIG
| | AC_PROG_INTLTOOL
| | PKG_PROG_PKG_CONFIG
| |
| | -GETTEXT_PACKAGE=gaim
| | +GETTEXT_PACKAGE=pidgin
| | AC_SUBST(GETTEXT_PACKAGE)
| |
| |
| | ============================================================
| | --- libpurple/protocols/jabber/auth.c c25ad53febfcb660b78135e9962037b4dfe62773
| | +++ libpurple/protocols/jabber/auth.c 52eb43ed9d4ff4ee37df6c65d5a6665305b47f36
| | @@ -207,13 +207,8 @@ static void jabber_auth_start_cyrus(Jabb
| |
| | do {
| | again = FALSE;
| | - /* Use the user's domain for compatibility with the old
| | - * DIGESTMD5 code. Note that this may cause problems where
| | - * the user's domain doesn't match the FQDN of the jabber
| | - * service
| | - */
| |
| | - js->sasl_state = sasl_client_new("xmpp", js->user->domain, NULL, NULL, js->sasl_cb, 0, &js->sasl);
| | + js->sasl_state = sasl_client_new("xmpp", js->serverFQDN, NULL, NULL, js->sasl_cb, 0, &js->sasl);
| | if (js->sasl_state==SASL_OK) {
| | sasl_setprop(js->sasl, SASL_SEC_PROPS, &secprops);
| | gaim_debug_info("sasl", "Mechs found: %s\n", js->sasl_mechs->str);
| | @@ -261,6 +256,12 @@ static void jabber_auth_start_cyrus(Jabb
| | * Presumably, if we get here that isn't the case and we shouldn't try again?
| | * I suspect that this never happens.
| | */
| | + /*
| | + * SXW: Yes, this is right. What this handles is the situation where a
| | + * mechanism, say GSSAPI, is tried. If that mechanism fails, it may be
| | + * due to mechanism specific issues, so we want to try one of the other
| | + * supported mechanisms. This code handles that case
| | + */
| | if (mech && strlen(mech) > 0) {
| | char *pos;
| | if ((pos = strstr(js->sasl_mechs->str, mech))) {
| | ============================================================
| | --- libpurple/protocols/jabber/jabber.c 967a7202a66fb3a58f0e02848c022f7105e8d126
| | +++ libpurple/protocols/jabber/jabber.c 3bdb8256299190ec37ca8607521883264a7e2473
| | @@ -504,6 +504,10 @@ static void jabber_login_connect(JabberS
| |
| | static void jabber_login_connect(JabberStream *js, const char *server, int port)
| | {
| | +#ifdef HAVE_CYRUS_SASL
| | + js->serverFQDN = g_strdup(server);
| | +#endif
| | +
| | if (gaim_proxy_connect(js->gc, js->gc->account, server,
| | port, jabber_login_callback, js->gc) == NULL)
| | gaim_connection_error(js->gc, _("Unable to create socket"));
| | @@ -1007,6 +1011,8 @@ static void jabber_close(GaimConnection
| | g_string_free(js->sasl_mechs, TRUE);
| | if(js->sasl_cb)
| | g_free(js->sasl_cb);
| | + if(js->serverFQDN)
| | + g_free(js->serverFQDN);
| | #endif
| | g_free(js->server_name);
| | g_free(js->gmail_last_time);
| | ============================================================
| | --- libpurple/protocols/jabber/jabber.h 27165767ac8675ce20c8e4bb5f9376add8411010
| | +++ libpurple/protocols/jabber/jabber.h 9fd793f9a4b2102d06ed7f1e9c62307ad6ea4a46
| | @@ -123,7 +123,7 @@ typedef struct _JabberStream
| | GSList *pending_avatar_requests;
| |
| | GSList *pending_buddy_info_requests;
| | -
| | +
| | GaimCircBuffer *write_buffer;
| | guint writeh;
| |
| | @@ -132,7 +132,7 @@ typedef struct _JabberStream
| | JabberCapabilities server_caps;
| | gboolean googletalk;
| | char *server_name;
| | -
| | +
| | char *gmail_last_time;
| | char *gmail_last_tid;
| |
| | @@ -145,6 +145,7 @@ typedef struct _JabberStream
| | int sasl_state;
| | int sasl_maxbuf;
| | GString *sasl_mechs;
| | + char *serverFQDN;
| | #endif
| |
| | } JabberStream;
| | ============================================================
| | --- po/POTFILES.in 9bf9a1489cee22b4d103db9c8d4c4da91c20fbfd
| | +++ po/POTFILES.in fc291765cf57b807a21a0088fcfb4c0af060f737
| | @@ -1,4 +1,4 @@
| | -gaim.desktop.in
| | +pidgin.desktop.in
| | console/gntaccount.c
| | console/gntblist.c
| | console/gntconn.c
| | ============================================================
| | --- po/stats.pl 8d5532df1b8bb649025e1e1511b01e21a4cf9641
| | +++ po/stats.pl c1f9ab1b5c07939da6b25554bf283e1977fb3d13
| | @@ -20,7 +20,7 @@ use POSIX qw(strftime);
| | use POSIX qw(strftime);
| |
| |
| | -my $PACKAGE="gaim";
| | +my $PACKAGE="pidgin";
| |
| |
| | use Locale::Language;
| | ============================================================
| | --- console/gntaccount.c e146c2e936423ce24de8690d512656030f90ec2a
| | +++ console/gntaccount.c 29a28ffb423894e600efd1a183f5d1376556aa28
| | @@ -835,11 +835,98 @@ request_add(GaimAccount *account, const
| | g_free(buffer);
| | }
| |
| | -static GaimAccountUiOps ui_ops =
| | +/* Copied from gtkaccount.c */
| | +typedef struct {
| | + GaimAccountRequestAuthorizationCb auth_cb;
| | + GaimAccountRequestAuthorizationCb deny_cb;
| | + void *data;
| | + char *username;
| | + char *alias;
| | + GaimAccount *account;
| | +} auth_and_add;
| | +
| | +static void
| | +authorize_and_add_cb(auth_and_add *aa)
| | {
| | + aa->auth_cb(aa->data);
| | + gaim_blist_request_add_buddy(aa->account, aa->username,
| | + NULL, aa->alias);
| | +
| | + g_free(aa->username);
| | + g_free(aa->alias);
| | + g_free(aa);
| | +}
| | +
| | +static void
| | +deny_no_add_cb(auth_and_add *aa)
| | +{
| | + aa->deny_cb(aa->data);
| | +
| | + g_free(aa->username);
| | + g_free(aa->alias);
| | + g_free(aa);
| | +}
| | +
| | +static void *
| | +gg_request_authorize(GaimAccount *account, const char *remote_user,
| | + const char *id, const char *alias, const char *message, gboolean on_list,
| | + GCallback auth_cb, GCallback deny_cb, void *user_data)
| | +{
| | + char *buffer;
| | + GaimConnection *gc;
| | + void *uihandle;
| | +
| | + gc = gaim_account_get_connection(account);
| | + if (message != NULL && *message == '\0')
| | + message = NULL;
| | +
| | + buffer = g_strdup_printf(_("%s%s%s%s wants to add %s to his or her buddy list%s%s"),
| | + remote_user,
| | + (alias != NULL ? " (" : ""),
| | + (alias != NULL ? alias : ""),
| | + (alias != NULL ? ")" : ""),
| | + (id != NULL
| | + ? id
| | + : (gaim_connection_get_display_name(gc) != NULL
| | + ? gaim_connection_get_display_name(gc)
| | + : gaim_account_get_username(account))),
| | + (message != NULL ? ": " : "."),
| | + (message != NULL ? message : ""));
| | + if (!on_list) {
| | + auth_and_add *aa = g_new(auth_and_add, 1);
| | + aa->auth_cb = (GaimAccountRequestAuthorizationCb)auth_cb;
| | + aa->deny_cb = (GaimAccountRequestAuthorizationCb)deny_cb;
| | + aa->data = user_data;
| | + aa->username = g_strdup(remote_user);
| | + aa->alias = g_strdup(alias);
| | + aa->account = account;
| | + uihandle = gaim_request_action(NULL, _("Authorize buddy?"), buffer, NULL,
| | + GAIM_DEFAULT_ACTION_NONE, aa, 2,
| | + _("Authorize"), authorize_and_add_cb,
| | + _("Deny"), deny_no_add_cb);
| | + } else {
| | + uihandle = gaim_request_action(NULL, _("Authorize buddy?"), buffer, NULL,
| | + GAIM_DEFAULT_ACTION_NONE, user_data, 2,
| | + _("Authorize"), auth_cb,
| | + _("Deny"), deny_cb);
| | + }
| | + g_free(buffer);
| | + return uihandle;
| | +}
| | +
| | +static void
| | +gg_request_close(void *uihandle)
| | +{
| | + gaim_request_close(GAIM_REQUEST_ACTION, uihandle);
| | +}
| | +
| | +static GaimAccountUiOps ui_ops =
| | +{
| | .notify_added = notify_added,
| | .status_changed = NULL,
| | - .request_add = request_add
| | + .request_add = request_add,
| | + .request_authorize = gg_request_authorize,
| | + .close_account_request = gg_request_close
| | };
| |
| | GaimAccountUiOps *gg_accounts_get_ui_ops()
To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 01e79f9c7ec957a574f7f14ad3c02de473d744b9
More information about the Commits
mailing list