aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-data-wrapper.c8
-rw-r--r--camel/camel-mime-part.c3
3 files changed, 13 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 024f99d8a9..bbfeb04372 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,10 @@
2000-04-18 Dan Winship <danw@helixcode.com>
+ * camel-mime-part.c (my_set_input_stream):
+ * camel-data-wrapper.c (set_input_stream, set_output_stream): do
+ better reference counting of streams so they actually go away
+ when they should.
+
* camel-log.[ch], *: Nuke camel log stuff. Replace calls to
CAMEL_LOG_WARNING with calls to g_warning.
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
index 3d05ae3b54..4f071e9063 100644
--- a/camel/camel-data-wrapper.c
+++ b/camel/camel-data-wrapper.c
@@ -143,8 +143,10 @@ set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
if (!data_wrapper->output_stream && stream)
set_output_stream (data_wrapper, stream);
- if (stream)
+ if (stream) {
gtk_object_ref (GTK_OBJECT (stream));
+ gtk_object_sink (GTK_OBJECT (stream));
+ }
}
/**
@@ -201,8 +203,10 @@ set_output_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
gtk_object_unref (GTK_OBJECT (data_wrapper->output_stream));
data_wrapper->output_stream = stream;
- if (stream)
+ if (stream) {
gtk_object_ref (GTK_OBJECT (stream));
+ gtk_object_sink (GTK_OBJECT (stream));
+ }
}
/**
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 9733eb31b1..ca4f71dc31 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -816,7 +816,8 @@ my_set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
mime_part->content_input_stream = camel_seekable_substream_new_with_seekable_stream_and_bounds (seekable_stream,
content_stream_inf_bound,
-1);
-
+ gtk_object_ref (GTK_OBJECT (mime_part->content_input_stream));
+ gtk_object_sink (GTK_OBJECT (mime_part->content_input_stream));
}