Re: [evolution-patches] exchange connector search offline fix




I suggest you don't use camel_type_get_global_classfuncs or whatever it is anymore, just use camel_folder_search_get_type(), since camel types are the classes themselves.

On Thu, 2005-02-10 at 20:43 -0500, Jeffrey Stedfast wrote:
connector suffered from the same bug imap4 did, so I fixed it to check
offline state before going thru with the search online implementation.

Jeff

text/plain attachment (connector-search-offline.patch), ""
? connector-search-offline.patch
? depcomp
? lib/urltest
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.256
diff -u -r1.256 ChangeLog
--- ChangeLog	10 Feb 2005 13:27:38 -0000	1.256
+++ ChangeLog	11 Feb 2005 01:42:58 -0000
@@ -1,3 +1,9 @@
+2005-02-10  Jeffrey Stedfast  <fejj novell com>
+
+	* camel/camel-exchange-search.c (exchange_body_contains): Check
+	network availability. If unavail, fall back to parent search class
+	body_contains() method.
+
 2005-02-10  Sushma Rai  <rsushma novell com>
 
 	* lib/e2k-autoconfig.c (validate): Changed the support URL value.
Index: INSTALL
===================================================================
RCS file: /cvs/gnome/evolution-exchange/INSTALL,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 INSTALL
--- INSTALL	11 May 2004 15:09:03 -0000	1.1.1.1
+++ INSTALL	11 Feb 2005 01:42:58 -0000
@@ -1,4 +1,4 @@
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
 Foundation, Inc.
 
    This file is free documentation; the Free Software Foundation gives
Index: camel/camel-exchange-search.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/camel/camel-exchange-search.c,v
retrieving revision 1.2
diff -u -r1.2 camel-exchange-search.c
--- camel/camel-exchange-search.c	14 Sep 2004 19:28:45 -0000	1.2
+++ camel/camel-exchange-search.c	11 Feb 2005 01:42:58 -0000
@@ -25,6 +25,8 @@
 
 #include <string.h>
 
+#include <camel/camel-offline-store.h>
+
 #include "camel-exchange-search.h"
 #include "camel-exchange-folder.h"
 
@@ -32,13 +34,19 @@
 exchange_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv,
 			CamelFolderSearch *s);
 
+
+static CamelFolderSearchClass *parent_class = NULL;
+
+
 static void
 camel_exchange_search_class_init (CamelExchangeSearchClass *camel_exchange_search_class)
 {
 	/* virtual method overload */
 	CamelFolderSearchClass *camel_folder_search_class =
 		CAMEL_FOLDER_SEARCH_CLASS (camel_exchange_search_class);
-
+	
+	parent_class = (CamelFolderSearchClass *) camel_type_get_global_classfuncs (CAMEL_FOLDER_SEARCH_TYPE);
+	
 	/* virtual method overload */
 	camel_folder_search_class->body_contains = exchange_body_contains;
 }
@@ -72,7 +80,10 @@
 	GHashTable *uid_hash = NULL;
 	GPtrArray *found_uids;
 	int i;
-
+	
+	if (((CamelOfflineStore *) s->folder->parent_store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+		return parent_class->body_contains (f, argc, argv, s);
+	
 	if (s->current) {
 		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.bool = FALSE;


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