diff options
| author | Sankar P <psankar@novell.com> | 2008-01-07 05:42:15 +0000 |
|---|---|---|
| committer | Sankarasivasubramanian Pasupathilingam <psankar@src.gnome.org> | 2008-01-07 05:42:15 +0000 |
| commit | 606b4677bd75a2b83151dc1c84b07388363c45bf (patch) | |
| tree | d1844789d43e496bc2809f32b56d333fe8a79a70 | |
| parent | ace378ecbad797fd3651c38f9b95e0499dd9f19c (diff) | |
| download | evolution-data-server-606b4677bd75a2b83151dc1c84b07388363c45bf.tar.gz | |
Convert a g_assert to g_warning. Reduces the severity of #348149
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
svn path=/branches/gnome-2-20/; revision=8341
| -rw-r--r-- | camel/ChangeLog | 7 | ||||
| -rw-r--r-- | camel/camel-partition-table.c | 17 |
2 files changed, 23 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index cfb8e5625..03e284de2 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -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 diff --git a/camel/camel-partition-table.c b/camel/camel-partition-table.c index 02c324555..e921fc27f 100644 --- a/camel/camel-partition-table.c +++ b/camel/camel-partition-table.c @@ -761,7 +761,15 @@ camel_key_table_add(CamelKeyTable *ki, const char *key, camel_block_t data, unsi 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 @@ camel_key_table_set_flags(CamelKeyTable *ki, camel_key_t keyid, unsigned int fla 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); |
