[evolution-patches] fix for bug #43159



just suppressing warning spewage.

I changed some g_warnings into printf's just to be consistant with the
other debug printf's in those functions that were already wrapped by the
d() or io() macros. Anything that was meant to be an alert that might be
"useful to the user" I left as a g_warning()

Jeff

-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com
? 43159.patch
? ChangeLog.nonximian
? body
? body.c
? body.txt
? camel-mime-filter-windows.c
? camel-mime-filter-windows.h
? charset-map.c
? charset-map.diff
? cmsutil.c
? date.patch
? debug.patch
? ehlo.patch
? evolution-1.3-gpg.patch
? folder-info-build.patch
? foo
? html-filter-broken.msg
? imap
? invalid-content-id.patch
? iso
? iso.c
? pop3-uidl.patch
? smime
? win-charset.patch
? tests/mime-filter/test-tohtml
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1817
diff -u -r1.1817 ChangeLog
--- ChangeLog	19 May 2003 17:20:04 -0000	1.1817
+++ ChangeLog	19 May 2003 17:32:46 -0000
@@ -1,3 +1,14 @@
+2003-05-19  Jeffrey Stedfast  <fejj ximian com>
+
+	* camel-folder-summary.c (camel_folder_summary_load): Only display
+	a warning if errno != EINVAL (EINVAL means there was a version
+	mismatch, so we don't really need to warn here since we are
+	supposed to be able to handle this situation).
+	(perform_content_info_load): Turn off debugging message.
+	(summary_assign_uid): Turn off uid-clash warning.
+	(camel_folder_summary_decode_token): Turn off debug messages.
+	(summary_header_load): Turn off version-mismatch warning.
+
 2003-05-16  Jeremy Katz  <katzj redhat com>
 
 	* providers/smtp/camel-smtp-transport.c (smtp_helo): Ensure cmdbuf
Index: camel-folder-summary.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-folder-summary.c,v
retrieving revision 1.119
diff -u -r1.119 camel-folder-summary.c
--- camel-folder-summary.c	16 May 2003 18:47:49 -0000	1.119
+++ camel-folder-summary.c	19 May 2003 17:32:49 -0000
@@ -1,6 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- *  Copyright (C) 2000 Ximian Inc.
+ *  Copyright (C) 2000-2003 Ximian Inc.
  *
  *  Authors: Michael Zucchi <notzed ximian com>
  *
@@ -535,7 +535,7 @@
 			my_list_append((struct _node **)&ci->childs, (struct _node *)part);
 			part->parent = ci;
 		} else {
-			g_warning("Summary file format messed up?");
+			d(fprintf (stderr, "Summary file format messed up?"));
 			camel_folder_summary_content_info_free(s, ci);
 			return NULL;
 		}
@@ -589,7 +589,9 @@
 	return 0;
 
 error:
-	g_warning ("Cannot load summary file: `%s': %s", s->summary_path, g_strerror (errno));
+	if (errno != EINVAL)
+		g_warning ("Cannot load summary file: `%s': %s", s->summary_path, g_strerror (errno));
+	
 	CAMEL_SUMMARY_UNLOCK(s, io_lock);
 	fclose (in);
 	s->flags |= ~CAMEL_SUMMARY_DIRTY;
@@ -756,7 +758,7 @@
 		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
 		if (mi == info)
 			return 0;
-		g_warning("Trying to insert message with clashing uid (%s).  new uid re-assigned", camel_message_info_uid(info));
+		d(printf ("Trying to insert message with clashing uid (%s).  new uid re-assigned", camel_message_info_uid(info)));
 		camel_message_info_set_uid(info, camel_folder_summary_next_uid_string(s));
 		uid = camel_message_info_uid(info);
 		info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
@@ -1305,7 +1307,7 @@
 	io(printf("Decode token ...\n"));
 	
 	if (camel_file_util_decode_uint32(in, &len) == -1) {
-		g_warning("Could not decode token from file");
+		io(printf ("Could not decode token from file"));
 		*str = NULL;
 		return -1;
 	}
@@ -1316,12 +1318,12 @@
 		} else if (len<= tokens_len) {
 			ret = g_strdup(tokens[len-1]);
 		} else {
-			g_warning("Invalid token encountered: %d", len);
+			io(printf ("Invalid token encountered: %d", len));
 			*str = NULL;
 			return -1;
 		}
 	} else if (len > 10240) {
-		g_warning("Got broken string header length: %d bytes", len);
+		io(printf ("Got broken string header length: %d bytes", len));
 		*str = NULL;
 		return -1;
 	} else {
@@ -1387,7 +1389,7 @@
 	s->time = time;
 	s->saved_count = count;
 	if (s->version != version) {
-		g_warning("Summary header version mismatch");
+		d(printf ("Summary header version mismatch"));
 		errno = EINVAL;
 		return -1;
 	}


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