[evolution] Bug #597567 - Crash in comp_subject()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #597567 - Crash in comp_subject()
- Date: Thu, 21 Oct 2010 09:40:37 +0000 (UTC)
commit d4adff17a2d05f2347e8836e5de0634fc2bca68f
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 21 11:39:53 2010 +0200
Bug #597567 - Crash in comp_subject()
Fix works only when compiled with libical 0.46 or later
configure.ac | 14 ++++++++++++++
shell/main.c | 8 ++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d6fdd83..d7c2abe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1363,6 +1363,20 @@ EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $GTKHTML libebook-1.2 libecal-1.2 $LIB
AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
AC_SUBST(EVOLUTION_CALENDAR_LIBS)
+dnl ****************************
+dnl Check for ical_set_unknown_token_handling_setting function
+dnl ****************************
+AC_MSG_CHECKING([ical_set_unknown_token_handling_setting function])
+save_cflags=$CFLAGS; CFLAGS=$EVOLUTION_CALENDAR_CFLAGS
+save_libs=$LIBS; LIBS="$EVOLUTION_CALENDAR_LIBS"
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include <libical/ical.h>]],
+ [[ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN)]])],
+ [AC_DEFINE(HAVE_ICAL_UNKNOWN_TOKEN_HANDLING, 1, [libical provides ical_set_unknown_token_handling_setting function]) ac_cv_have_iuth=yes],[ac_cv_have_iuth=no])
+CFLAGS=$save_cflags
+LIBS=$save_libs
+AC_MSG_RESULT([$ac_cv_have_iuth])
+
dnl **********
dnl Mail Flags
dnl **********
diff --git a/shell/main.c b/shell/main.c
index cf39a47..7f2bd06 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -80,6 +80,10 @@
#include <sys/stat.h>
#include <unistd.h>
+#ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
+#include <libical/ical.h>
+#endif
+
#define SKIP_WARNING_DIALOG_KEY \
"/apps/evolution/shell/skip_warning_dialog"
@@ -531,6 +535,10 @@ main (gint argc, gchar **argv)
if (!g_thread_get_initialized ())
g_thread_init (NULL);
+ #ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
+ ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
+ #endif
+
#ifdef G_OS_WIN32
path = g_build_path (";", _e_get_bindir (), g_getenv ("PATH"), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]