[evolution-data-server/gnome-2-26] Check for the validity of DT* strings. Crashes on windows port.
- From: Bharath Acharya <abharath src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-data-server/gnome-2-26] Check for the validity of DT* strings. Crashes on windows port.
- Date: Mon, 4 May 2009 01:58:43 -0400 (EDT)
commit c1cb2b3462c4f4d378729717c60774d592084448
Author: Bharath Acharya <abharath novell com>
Date: Mon May 4 11:27:44 2009 +0530
Check for the validity of DT* strings. Crashes on windows port.
---
camel/providers/groupwise/camel-groupwise-folder.c | 35 +++++++++++++++----
1 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/camel/providers/groupwise/camel-groupwise-folder.c b/camel/providers/groupwise/camel-groupwise-folder.c
index 83164b7..36fc4f4 100644
--- a/camel/providers/groupwise/camel-groupwise-folder.c
+++ b/camel/providers/groupwise/camel-groupwise-folder.c
@@ -2643,6 +2643,7 @@ convert_to_calendar (EGwItem *item, char **str, int *len)
int recur_key = 0;
char **tmp = NULL;
const char *temp = NULL;
+ const char *tmp_dt = NULL;
tmp = g_strsplit (e_gw_item_get_id (item), "@", -1);
@@ -2661,7 +2662,9 @@ convert_to_calendar (EGwItem *item, char **str, int *len)
g_string_append_printf (gstr, "UID:%s\n",e_gw_item_get_icalid (item));
g_string_append_printf (gstr, "X-GWITEM-TYPE:APPOINTMENT\n");
- g_string_append_printf (gstr, "DTSTART:%s\n",e_gw_item_get_start_date (item));
+ tmp_dt = e_gw_item_get_start_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTSTART:%s\n", tmp_dt);
g_string_append_printf (gstr, "SUMMARY:%s\n", e_gw_item_get_subject (item));
temp = e_gw_item_get_message (item);
@@ -2677,7 +2680,9 @@ convert_to_calendar (EGwItem *item, char **str, int *len)
g_string_append(gstr, "\n");
}
- g_string_append_printf (gstr, "DTSTAMP:%s\n", e_gw_item_get_creation_date (item));
+ tmp_dt = e_gw_item_get_creation_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTSTAMP:%s\n", tmp_dt);
g_string_append_printf (gstr, "X-GWMESSAGEID:%s\n", e_gw_item_get_id (item));
g_string_append_printf (gstr, "X-GWSHOW-AS:BUSY\n");
g_string_append_printf (gstr, "X-GWRECORDID:%s\n", tmp[0]);
@@ -2699,7 +2704,9 @@ convert_to_calendar (EGwItem *item, char **str, int *len)
}
}
- g_string_append_printf (gstr, "DTEND:%s\n", e_gw_item_get_end_date (item));
+ tmp_dt = e_gw_item_get_end_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTEND:%s\n", tmp_dt);
temp = NULL;
temp = e_gw_item_get_place (item);
@@ -2739,6 +2746,7 @@ convert_to_task (EGwItem *item, char **str, int *len)
GString *gstr = g_string_new (NULL);
char **tmp = NULL;
const char *temp = NULL;
+ const char *tmp_dt = NULL;
tmp = g_strsplit (e_gw_item_get_id (item), "@", -1);
@@ -2746,7 +2754,9 @@ convert_to_task (EGwItem *item, char **str, int *len)
gstr = g_string_append (gstr, "METHOD:REQUEST\n");
gstr = g_string_append (gstr, "BEGIN:VTODO\n");
g_string_append_printf (gstr, "UID:%s\n",e_gw_item_get_icalid (item));
- g_string_append_printf (gstr, "DTSTART:%s\n",e_gw_item_get_start_date (item));
+ tmp_dt = e_gw_item_get_start_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTSTART:%s\n", tmp_dt);
g_string_append_printf (gstr, "SUMMARY:%s\n", e_gw_item_get_subject (item));
temp = e_gw_item_get_message (item);
@@ -2763,7 +2773,9 @@ convert_to_task (EGwItem *item, char **str, int *len)
}
temp = NULL;
- g_string_append_printf (gstr, "DTSTAMP:%s\n", e_gw_item_get_creation_date (item));
+ tmp_dt = e_gw_item_get_creation_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTSTAMP:%s\n", tmp_dt);
g_string_append_printf (gstr, "X-GWMESSAGEID:%s\n", e_gw_item_get_id (item));
g_string_append_printf (gstr, "X-GWSHOW-AS:BUSY\n");
g_string_append_printf (gstr, "X-GWRECORDID:%s\n", tmp[0]);
@@ -2785,7 +2797,9 @@ convert_to_task (EGwItem *item, char **str, int *len)
}
}
- g_string_append_printf (gstr, "DTEND:%s\n", e_gw_item_get_end_date (item));
+ tmp_dt = e_gw_item_get_end_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTEND:%s\n", tmp_dt);
temp = e_gw_item_get_place (item);
if (temp)
@@ -2818,6 +2832,7 @@ convert_to_note (EGwItem *item, char **str, int *len)
GString *gstr = g_string_new (NULL);
char **tmp = NULL;
const char *temp = NULL;
+ const char *tmp_dt = NULL;
tmp = g_strsplit (e_gw_item_get_id (item), "@", -1);
@@ -2825,7 +2840,9 @@ convert_to_note (EGwItem *item, char **str, int *len)
gstr = g_string_append (gstr, "METHOD:PUBLISH\n");
gstr = g_string_append (gstr, "BEGIN:VJOURNAL\n");
g_string_append_printf (gstr, "UID:%s\n",e_gw_item_get_icalid (item));
- g_string_append_printf (gstr, "DTSTART:%s\n",e_gw_item_get_start_date (item));
+ tmp_dt = e_gw_item_get_start_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTSTART:%s\n", tmp_dt);
g_string_append_printf (gstr, "SUMMARY:%s\n", e_gw_item_get_subject (item));
temp = e_gw_item_get_message (item);
@@ -2842,7 +2859,9 @@ convert_to_note (EGwItem *item, char **str, int *len)
}
temp = NULL;
- g_string_append_printf (gstr, "DTSTAMP:%s\n", e_gw_item_get_creation_date (item));
+ tmp_dt = e_gw_item_get_creation_date (item);
+ if (tmp_dt)
+ g_string_append_printf (gstr, "DTSTAMP:%s\n", tmp_dt);
g_string_append_printf (gstr, "X-GWMESSAGEID:%s\n", e_gw_item_get_id (item));
g_string_append_printf (gstr, "X-GWRECORDID:%s\n", tmp[0]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]