aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/camel-mime-filter-tohtml.c2
-rw-r--r--camel/camel-object.c8
3 files changed, 16 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 916e4b6f70..def0617fe2 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,10 +1,18 @@
2003-01-13 Not Zed <NotZed@Ximian.com>
+ * camel-mime-filter-tohtml.c: fix header include order.
+
+ * camel-object.c (camel_object_bag_reserve): Add an assert to
+ check we're not trying to reserve the bag more than once in a
+ given thread.
+ (camel_object_bag_list): If we have reserved the bag, dont try and
+ cond wait. Fixes a deadlock.
+
* camel-mime-filter-tohtml.c (writeln): Read the characters as
utf8, rather than as 8 bit bytes. Remove the PRESERVE_8BIT as it
has no meaning. Also change the default logic slightly so that 8
bit or greater characters are properly converted to entities.
-
+
* camel-utf8.c (camel_utf8_getc_limit): new function, gets a utf8
char, bounded by an end pointer.
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c
index 370d9c6c4e..320ebf34fc 100644
--- a/camel/camel-mime-filter-tohtml.c
+++ b/camel/camel-mime-filter-tohtml.c
@@ -28,9 +28,9 @@
#include <stdio.h>
#include <string.h>
-#include "camel-utf8.h"
#include "camel-url-scanner.h"
#include "camel-mime-filter-tohtml.h"
+#include "camel-utf8.h"
#define d(x)
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 7214518839..b2cf6ffea5 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -1212,6 +1212,7 @@ void *camel_object_bag_reserve(CamelObjectBag *bag, const char *key)
/* NOTE: We dont actually reserve the key, we just reserve
the whole bag. We could do either but this is easier */
if (bag->flags & CAMEL_OBJECT_BAG_RESERVED) {
+ g_assert(bag->owner != pthread_self());
e_mutex_cond_wait(&bag->cond, type_lock);
retry = TRUE;
} else {
@@ -1265,8 +1266,11 @@ GPtrArray *camel_object_bag_list(CamelObjectBag *bag)
list = g_ptr_array_new();
E_LOCK(type_lock);
- while (bag->flags & CAMEL_OBJECT_BAG_RESERVED)
- e_mutex_cond_wait(&bag->cond, type_lock);
+ if (bag->flags & CAMEL_OBJECT_BAG_RESERVED
+ && (bag->owner != pthread_self())) {
+ while (bag->flags & CAMEL_OBJECT_BAG_RESERVED)
+ e_mutex_cond_wait(&bag->cond, type_lock);
+ }
g_hash_table_foreach(bag->object_table, (GHFunc)save_bag, list);
E_UNLOCK(type_lock);