[evolution-data-server] Bug #597567 - Crash in comp_subject()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #597567 - Crash in comp_subject()
- Date: Thu, 21 Oct 2010 09:39:34 +0000 (UTC)
commit 1e3daecf16316bbd5b6f185647deb2ca0dc365a1
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 21 11:38:09 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 88aeb41..325d95c 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 7a1d4c4..9d89b29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1251,6 +1251,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]