Revision de97727cbd953014f911dbba559d51626602b3e2

markdoliner at pidgin.im markdoliner at pidgin.im
Sun Mar 4 21:03:23 EST 2007


o     -----------------------------------------------------------------
|\    Revision: de97727cbd953014f911dbba559d51626602b3e2
| |   Ancestor: 8d1175446aba95222f38c31207ca29c492f9d0fb
| |   Ancestor: d59e830c02b5909e91b567258fca78dc9af8e282
| |   Author: markdoliner at pidgin.im
| |   Date: 2007-03-05T01:58:25
| |   Branch: im.pidgin.pidgin
| |   
| |   Modified files:
| |           configure.ac console/gntaccount.c
| |           console/libgnt/gnttextview.c console/libgnt/test/tv.c
| |           console/libgnt/wms/s.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 '8d1175446aba95222f38c31207ca29c492f9d0fb'
| |        and 'd59e830c02b5909e91b567258fca78dc9af8e282'
| |   
| |   ============================================================
| |   --- console/libgnt/gnttextview.c	b3b66b77893fd432931f5defff14692eca3cd143
| |   +++ console/libgnt/gnttextview.c	5c152791907269250a1214666352028971bc9066
| |   @@ -204,9 +204,9 @@ gnt_text_view_get_p(GntTextView *view, i
| |    	do {
| |    		line = lines->data;
| |    		lines = lines->next;
| |   -	} while (line && !line->segments);
| |   +	} while (line && !line->segments && lines);
| |    
| |   -	if (!line) /* no valid line */
| |   +	if (!line || !line->segments) /* no valid line */
| |    		return NULL;
| |    	segs = line->segments;
| |    	seg = (GntTextSegment *)segs->data;
| |   ============================================================
| |   --- console/libgnt/test/tv.c	a48459c9f1599fb61619568505c5fe2c5d6eafa6
| |   +++ console/libgnt/test/tv.c	df77d3d23638996e5d22f096fabe7c21cc878a1c
| |   @@ -83,6 +83,7 @@ int main()
| |    	gnt_entry_set_history_length(GNT_ENTRY(entry), -1);
| |    	g_signal_connect_after(G_OBJECT(entry), "key_pressed", G_CALLBACK(key_pressed), view);
| |    
| |   +	gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "\n", GNT_TEXT_FLAG_NORMAL);
| |    	gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "plugins: ", GNT_TEXT_FLAG_BOLD);
| |    	gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(view), "this is the 1st line\n", GNT_TEXT_FLAG_NORMAL);
| |    
| |   ============================================================
| |   --- console/libgnt/wms/s.c	2cd03d376d2625a7d36fca115f4a900b9ffe8b24
| |   +++ console/libgnt/wms/s.c	4b2ae45e14f3333c6da99240d216465a4972ec93
| |   @@ -182,7 +182,7 @@ toggle_clipboard(GntBindable *bindable, 
| |    	text = gnt_get_clipboard_string();
| |    	clip = gnt_hwindow_new(FALSE);
| |    	GNT_WIDGET_SET_FLAGS(clip, GNT_WIDGET_TRANSIENT);
| |   -	GNT_WIDGET_UNSET_FLAGS(clip, GNT_WIDGET_NO_BORDER);
| |   +	GNT_WIDGET_SET_FLAGS(clip, GNT_WIDGET_NO_BORDER);
| |    	gnt_box_set_pad(GNT_BOX(clip), 0);
| |    	gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(" "));
| |    	gnt_box_add_widget(GNT_BOX(clip), gnt_label_new(text));
| |   ============================================================
| |   --- 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)
| |    
| |    
| |   ============================================================
| |   --- 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()
| |   ============================================================
| |   --- 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;

To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from de97727cbd953014f911dbba559d51626602b3e2


More information about the Commits mailing list