aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2005-07-12 13:53:08 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2005-07-12 13:53:08 +0800
commit02e6fcebcf3ab06076edcbae8f8da0777f5e0b9f (patch)
tree59e59423c01ba50de29567192b046b4c8ad44da4
parent7681e330646707292dfd42d4c52e465605e3b02a (diff)
downloadgsoc2013-evolution-02e6fcebcf3ab06076edcbae8f8da0777f5e0b9f.tar.gz
gsoc2013-evolution-02e6fcebcf3ab06076edcbae8f8da0777f5e0b9f.tar.zst
gsoc2013-evolution-02e6fcebcf3ab06076edcbae8f8da0777f5e0b9f.zip
Fixed some compiler warning and checked some negative cases
2005-07-12 Srinivasa Ragavan <sragavan@novell.com> * gui/dialogs/comp-editor.c: (get_attachment_list) (attachment_guess_mime_type) (comp_editor_close) (comp_editor_get_mime_attach_list) Fixed some compiler warning and checked some negative cases svn path=/trunk/; revision=29733
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/dialogs/comp-editor.c16
2 files changed, 18 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index e0a93ee5a9..c80ee17c60 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,4 +1,11 @@
+2005-07-12 Srinivasa Ragavan <sragavan@novell.com>
+
+ * gui/dialogs/comp-editor.c: (get_attachment_list) (attachment_guess_mime_type)
+ (comp_editor_close) (comp_editor_get_mime_attach_list) Fixed some compiler
+ warning and checked some negative cases
+
2005-07-11 Srinivasa Ragavan <sragavan@novell.com>
+
* gui/dialogs/comp-editor.c:(get_attachment_list) (attachment_bar_changed_cb)
(attachment_bar_icon_clicked_cb) (cab_popups_free) (setup_widgets)
(set_attachment_list) (comp_editor_get_mime_attach_list)
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index c5e0c1286c..1cbfb09257 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -628,12 +628,19 @@ get_attachment_list (CompEditor *editor)
if (!stream) {
/* TODO handle error conditions */
g_message ("DEBUG: could not open the file to write\n");
+ g_free (attach_file_url);
continue;
}
- camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) stream);
+ if (camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) stream) == -1) {
+ g_free (attach_file_url);
+ camel_stream_close (stream);
+ camel_object_unref (stream);
+ g_message ("DEBUG: could not write to file\n");
+ }
+
camel_stream_close (stream);
- g_object_unref (stream);
+ camel_object_unref (stream);
list = g_slist_append (list, g_strdup (attach_file_url));
g_free (attach_file_url);
@@ -1992,7 +1999,7 @@ attachment_guess_mime_type (const char *file_name)
static void
set_attachment_list (CompEditor *editor, GSList *attach_list)
{
- GSList *parts = NULL, *attachment_list = NULL, *p = NULL;
+ GSList *p = NULL;
const char *comp_uid= NULL;
const char *local_store = e_cal_get_local_attachment_store (editor->priv->client);
@@ -2391,7 +2398,6 @@ comp_editor_close (CompEditor *editor)
GSList *
comp_editor_get_mime_attach_list (CompEditor *editor)
{
- GSList *mime_attach_list;
struct CalMimeAttach *cal_mime_attach;
GSList *attach_list = NULL, *l, *parts;
@@ -2423,7 +2429,7 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
attach_list = g_slist_append (attach_list, cal_mime_attach);
- g_object_unref (mstream);
+ camel_object_unref (mstream);
}