Re: [evolution-patches] fix for the bug in 63504 (don't send imap commands after a disconnect)



committed with notzed's suggested change

On Mon, 2004-08-23 at 15:24 -0400, Jeffrey Stedfast wrote:
> once an exception gets set while scanning folders, abort the loop.
> 
> Jeff
> 
> Plain text document attachment (63504.patch)
> ? 24026.patch
> ? 62136.patch
> ? 62771-camel.patch
> ? 63504.patch
> ? body
> ? body.c
> ? body.txt
> ? body2.txt
> ? build.patch
> ? charset-map.c
> ? charset-map.diff
> ? class.sh
> ? cmsutil.c
> ? date.patch
> ? flags
> ? foo
> ? foo.txt
> ? foo2.txt
> ? gw-body.txt
> ? iso
> ? iso.c
> ? lang.patch
> ? namespace.sh
> ? smime
> ? providers/imap4/reconnect.patch
> ? tests/data/camel-mime-tests.tar.gz
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
> retrieving revision 1.2246
> diff -u -r1.2246 ChangeLog
> --- ChangeLog	21 Aug 2004 06:58:22 -0000	1.2246
> +++ ChangeLog	23 Aug 2004 18:51:11 -0000
> @@ -1,3 +1,10 @@
> +2004-08-23  Jeffrey Stedfast  <fejj novell com>
> +
> +	* providers/imap/camel-imap-store.c (get_folders): Check for an
> +	exception from get_folders_online() here so that we don't send
> +	commands to an IMAP server after a disconnect for example. See bug
> +	#63504 for an example.
> +
>  2004-08-21 Sivaiah Nallagatla <snallagatla novell com>
>  	
>  	* providers/groupwise/camel-gw-listener.c (account_changed) :
> Index: providers/imap/camel-imap-store.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-store.c,v
> retrieving revision 1.298
> diff -u -r1.298 camel-imap-store.c
> --- providers/imap/camel-imap-store.c	21 Jul 2004 15:55:00 -0000	1.298
> +++ providers/imap/camel-imap-store.c	23 Aug 2004 18:51:11 -0000
> @@ -2789,7 +2789,7 @@
>  get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
>  {
>  	CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
> -	GSList *p = NULL;
> +	GSList *q, *p = NULL;
>  	GHashTable *infos;
>  	int i;
>  	GPtrArray *folders, *folders_out;
> @@ -2860,7 +2860,7 @@
>  
>  	/* p is a reversed list of pending folders for the next level, q is the list of folders for this */
>  	while (p) {
> -		GSList *q = g_slist_reverse(p);
> +		q = g_slist_reverse(p);
>  
>  		p = NULL;
>  		while (q) {
> @@ -2888,7 +2888,10 @@
>  				get_folders_online(imap_store, n, folders, flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
>  				g_free(n);
>  				g_free(real);
> -
> +				
> +				if (camel_exception_is_set (ex))
> +					goto fail;
> +				
>  				if (folders->len > 0)
>  					fi->flags |= CAMEL_FOLDER_CHILDREN;
>  
> @@ -2905,6 +2908,12 @@
>  
>  	return folders_out;
>  fail:
> +	while (p != NULL) {
> +		q = p->next;
> +		g_slist_free_1 (p);
> +		p = q;
> +	}
> +	
>  	g_ptr_array_free(folders, TRUE);
>  	g_ptr_array_free(folders_out, TRUE);
>  	g_hash_table_destroy(infos);
-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]