[evolution-data-server/gnome-2-32] Bug #597567 - Crash in comp_subject()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-32] Bug #597567 - Crash in comp_subject()
- Date: Thu, 21 Oct 2010 09:42:22 +0000 (UTC)
commit 5ef7c6dcdb4a2fed51353537cb029258bc19cc7f
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 21 11:41:30 2010 +0200
Bug #597567 - Crash in comp_subject()
Fix works only when compiled with libical 0.46 or later
calendar/libedata-cal/e-data-cal-factory.c | 8 ++++++++
configure.ac | 15 +++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
index 09bf229..72617e3 100644
--- a/calendar/libedata-cal/e-data-cal-factory.c
+++ b/calendar/libedata-cal/e-data-cal-factory.c
@@ -45,6 +45,10 @@
#include "e-gdbus-egdbuscalfactory.h"
+#ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
+#include <libical/ical.h>
+#endif
+
#ifdef G_OS_WIN32
#include <windows.h>
#include <conio.h>
@@ -895,6 +899,10 @@ main (gint argc, gchar **argv)
g_set_prgname (E_PRGNAME);
if (!g_thread_supported ()) g_thread_init (NULL);
+ #ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
+ ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
+ #endif
+
factory = g_object_new (E_TYPE_DATA_CAL_FACTORY, NULL);
loop = g_main_loop_new (NULL, FALSE);
diff --git a/configure.ac b/configure.ac
index 0d27757..31d3e82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1248,6 +1248,21 @@ dnl *****
EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, $EVOLUTION_CALENDAR_DEPS, $LIBICAL_EXTRA_CFLAGS, $LIBICAL_EXTRA_LIBS)
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])
+
fi
dnl ******************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]