#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 "
pthread_attr_t pta;
#endif
void *res;
- gboolean killed;
gchar *error = NULL;
result = NULL;
td = g_new0(thread_data, 1);
res = NULL;
- killed = FALSE;
td->url = url;
td->result = NULL;
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 "
}
}
item = folder_create_folder(root->node->data, title);
+ if (!item) {
+ if (verbose && manual_update) {
+ alertpanel_error(_("Could not create directory %s"),
+ title);
+ } else {
+ log_error(LOG_PROTOCOL, _("Could not create directory %s"),
+ title);
+ }
+ g_free(feed);
+ g_free(title);
+ main_window_cursor_normal(mainwindow_get_mainwindow());
+ return;
+ }
debug_print("item done %s\n", title);
((VCalFolderItem *)item)->uri = g_strdup(uri);
((VCalFolderItem *)item)->feed = feed;
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."));
FolderItem *item;
gchar *message;
AlertValue avalue;
- gchar *old_path;
gchar *old_id;
if (!folderview->selected) return;
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
- Xstrdup_a(old_path, item->path, return);
old_id = folder_item_get_identifier(item);
vcal_item_closed(item);
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;
}
oitem = gtk_cmctree_node_get_row_data(ctree, folderview->opened);
item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ if (!item)
+ return;
+
if (((VCalFolderItem *)(item))->use_cal_view == action)
return;
debug_print("set view %d\n", action);
gchar *recur = NULL;
int sequence = 0;
enum icalproperty_method method = ICAL_METHOD_REQUEST;
- enum icalproperty_kind type = ICAL_VEVENT_COMPONENT;
+ enum icalcomponent_kind type = ICAL_VEVENT_COMPONENT;
GSList *attendees = NULL;
if (comp == NULL) {
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);