[evolution-patches] patch to fix #273846 and #273878 (connector-calendar)
- From: Vivek Jain <jvivek novell com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] patch to fix #273846 and #273878 (connector-calendar)
- Date: Sat, 23 Apr 2005 16:19:06 +0530
Hi,
The attached patch fixes
http://bugzilla.gnome.org/show_bug.cgi?id=273846
and
http://bugzilla.gnome.org/show_bug.cgi?id=273878
The Changes are made in evolution-exchange/calendar/e-cal-backend.c
We have to make sure that length of the attachment file that we are
going to use always contains the no of bytes in the case of non-text
files also.
Thanks,
Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.325
diff -u -p -r1.325 ChangeLog
--- ChangeLog 23 Apr 2005 08:20:44 -0000 1.325
+++ ChangeLog 23 Apr 2005 10:30:07 -0000
@@ -1,3 +1,12 @@
+2005-04-23 Vivek Jain <set EMAIL_ADDRESS environment variable>
+
+ **Fixes #273846
+ * calendar/e-cal-backend-exchange.c: (get_attach_file_contents),
+ Modified the function to take length as an argument, so that we
+ can return no of bytes in the file.
+ (build_msg): pass the len pointer and use this length for writing the
+ file
+
2005-04-22 Sushma Rai <rsushma novell com>
* storage/exchange-config-listener.[ch] (requires_relogin): Check for
Index: calendar/e-cal-backend-exchange.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/calendar/e-cal-backend-exchange.c,v
retrieving revision 1.32
diff -u -p -r1.32 e-cal-backend-exchange.c
--- calendar/e-cal-backend-exchange.c 15 Mar 2005 06:17:01 -0000 1.32
+++ calendar/e-cal-backend-exchange.c 23 Apr 2005 10:30:07 -0000
@@ -1363,7 +1363,7 @@ get_attachment (ECalBackendExchange *cbe
}
static char *
-get_attach_file_contents (const char *filename)
+get_attach_file_contents (const char *filename, int *length)
{
int fd, len = 0;
struct stat sb;
@@ -1394,6 +1394,7 @@ get_attach_file_contents (const char *fi
end :
close (fd);
+ *length = len;
return file_contents;
}
@@ -1444,11 +1445,10 @@ build_msg ( ECalBackendExchange *cbex, E
attach_file = g_strdup_printf ("%s/%s-%s", cbex->priv->local_attachment_store, uid, filename);
}
- file_contents = get_attach_file_contents (fname);
- if (!file_contents)
+ file_contents = get_attach_file_contents (fname, &len);
+ if (!file_contents)
continue;
- len = strlen (file_contents);
dest_url = save_attach_file (attach_file, file_contents, len);
g_free (attach_file);
if (!dest_url)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]