#include "procheader.h"
#include "folder.h"
#include "folderview.h"
+#include "folder_item_prefs.h"
#include "vcalendar.h"
#include "vcal_folder.h"
#include "vcal_prefs.h"
prop = icalcomponent_get_first_property(evt, ICAL_DTSTART_PROPERTY);
if (prop) {
ritr = icalrecur_iterator_new(recur, icalproperty_get_dtstart(prop));
- next = icalrecur_iterator_next(ritr); /* skip first one */
+ next = icalrecur_iterator_next(ritr); /* skip first one */
}
rprop = rprop2;
item->evtlist = g_slist_prepend(item->evtlist, data);
data = NULL;
}
- if (rprop) {
+ if (rprop && ritr) {
struct icaldurationtype ical_dur;
struct icaltimetype dtstart, dtend;
evt = icalcomponent_new_clone(evt);
if (prop)
dtend = icalproperty_get_dtend(prop);
ical_dur = icaltime_subtract(dtend, dtstart);
- next = icalrecur_iterator_next(ritr);
+ next = icalrecur_iterator_next(ritr);
if (!icaltime_is_null_time(next) &&
!icaltime_is_null_time(dtstart) && i < 100) {
prop = icalcomponent_get_first_property(evt, ICAL_DTSTART_PROPERTY);
curl_easy_setopt(curl_ctx, CURLOPT_TIMEOUT, prefs_common_get_prefs()->io_timeout_secs);
curl_easy_setopt(curl_ctx, CURLOPT_NOSIGNAL, 1);
#if LIBCURL_VERSION_NUM >= 0x070a00
- curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYPEER, 0);
- curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYHOST, 0);
+ if(vcalprefs.ssl_verify_peer == FALSE) {
+ curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYHOST, 0);
+ }
#endif
curl_easy_setopt(curl_ctx, CURLOPT_USERAGENT,
"Claws Mail vCalendar plugin "
curl_easy_setopt(curl_ctx, CURLOPT_READDATA, fp);
curl_easy_setopt(curl_ctx, CURLOPT_HTTPHEADER, headers);
#if LIBCURL_VERSION_NUM >= 0x070a00
- curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYPEER, 0);
- curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYHOST, 0);
+ if(vcalprefs.ssl_verify_peer == FALSE) {
+ curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt(curl_ctx, CURLOPT_SSL_VERIFYHOST, 0);
+ }
#endif
curl_easy_setopt(curl_ctx, CURLOPT_USERAGENT,
"Claws Mail vCalendar plugin "
if (tmp == NULL)
return;
- if (!strncmp(tmp, "http://", 7)) {
+ if (!strncmp(tmp, "http", 4)) {
uri = tmp;
} else if (!strncmp(tmp, "file://", 7)) {
uri = tmp;
- } else if (!strncmp(tmp, "https://", 8)) {
- uri = tmp;
- } else if (!strncmp(tmp, "webcal://", 9)) {
- uri = g_strconcat("http://", tmp+9, NULL);
+ } else if (!strncmp(tmp, "webcal", 6)) {
+ uri = g_strconcat("http", tmp+6, NULL);
g_free(tmp);
} else {
alertpanel_error(_("Could not parse the URL."));
if (uri == NULL)
return FALSE;
- if (!strncmp(uri, "webcal://", 9)) {
- tmp = g_strconcat("http://", uri+9, NULL);
+ if (!strncmp(uri, "webcal", 6)) {
+ tmp = g_strconcat("http", uri+6, NULL);
} else {
return FALSE;
}
struct icaltimetype itt;
icalproperty_free(prop);
GET_PROP(comp, prop, ICAL_DTSTART_PROPERTY);
- itt = icalproperty_get_dtstart(prop);
if (prop) {
+ itt = icalproperty_get_dtstart(prop);
icalproperty_free(prop);
dtend = g_strdup(icaltime_as_ical_string(icaltime_add(itt,duration)));
TO_UTF8(dtend);