evolution-data-server r8341 - branches/gnome-2-20/camel



Author: psankar
Date: Mon Jan  7 05:42:15 2008
New Revision: 8341
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8341&view=rev

Log:
2008-01-07  Sankar P  <psankar novell com>

	* camel-partition-table.c: (camel_key_table_add),
	(camel_key_table_set_flags):
	Convert a g_assert to g_warning. 
	Reduces the severity of	#348149




Modified:
   branches/gnome-2-20/camel/ChangeLog
   branches/gnome-2-20/camel/camel-partition-table.c

Modified: branches/gnome-2-20/camel/ChangeLog
==============================================================================
--- branches/gnome-2-20/camel/ChangeLog	(original)
+++ branches/gnome-2-20/camel/ChangeLog	Mon Jan  7 05:42:15 2008
@@ -1,3 +1,10 @@
+2008-01-07  Sankar P  <psankar novell com>
+
+	* camel-partition-table.c: (camel_key_table_add),
+	(camel_key_table_set_flags):
+	Convert a g_assert to g_warning. 
+	Reduces the severity of	#348149
+
 2008-01-07  Srinivasa Ragavan <sragavan novell com>
 
 	** Fix for bug #405497 

Modified: branches/gnome-2-20/camel/camel-partition-table.c
==============================================================================
--- branches/gnome-2-20/camel/camel-partition-table.c	(original)
+++ branches/gnome-2-20/camel/camel-partition-table.c	Mon Jan  7 05:42:15 2008
@@ -761,7 +761,15 @@
 
 	kblast->used++;
 
+#if 0
 	g_assert(kblast->used < 127);
+#else
+	if (kblast->used >=127) {
+		g_warning("Invalid value for used %d\n", kblast->used);
+		return 0;
+	}
+#endif
+
 
 	camel_block_file_touch_block(ki->blocks, last);
 	camel_block_file_unref_block(ki->blocks, last);
@@ -826,8 +834,15 @@
 		return;
 	kb = (CamelKeyBlock *)&bl->data;
 
-	g_assert(kb->used < 127);
+#if 0
+	g_assert(kb->used < 127); /* this should be more accurate */
 	g_assert(index < kb->used);
+#else
+	if (kb->used >=127 || index >= kb->used) {
+		g_warning("Block %x: Invalid index or content: index %d used %d\n", blockid, index, kb->used);
+		return ;
+	}
+#endif
 
 	CAMEL_KEY_TABLE_LOCK(ki, lock);
 



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