From 5abbdb459be7870848ef16691174e91c68958304 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 28 Aug 2010 21:36:58 +0000 Subject: * Fixed CalDAV resource error messages and potential crash * Added write support to events with RECURRENCE-ID property Only remaining potential issue is modification of parent series and association/update/delete of child event RECURRENCE-ID fields git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1169262 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kresources/caldav/reader.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'kresources/caldav/reader.cpp') diff --git a/kresources/caldav/reader.cpp b/kresources/caldav/reader.cpp index a33c4d936..9e167e7d0 100644 --- a/kresources/caldav/reader.cpp +++ b/kresources/caldav/reader.cpp @@ -40,12 +40,14 @@ int CalDavReader::runJob(runtime_info* RT) { response* result = caldav_get_response(); CALDAV_RESPONSE res = OK; - if (mGetAll) { - kdDebug() << "getting all objects"; - res = caldav_getall_object(result, std::string(url().ascii()).c_str(), RT); - } else { - kdDebug() << "getting object from the specified time range"; - res = caldav_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(url().ascii()).c_str(), RT); + if ((OK == res) && (url() != "")) { + if (mGetAll) { + kdDebug() << "getting all objects"; + res = caldav_getall_object(result, std::string(url().ascii()).c_str(), RT); + } else { + kdDebug() << "getting object from the specified time range"; + res = caldav_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(url().ascii()).c_str(), RT); + } } if (OK == res) { @@ -64,8 +66,7 @@ int CalDavReader::runJob(runtime_info* RT) { if ((OK == res) && (tasksUrl() != "")) { kdDebug() << "reader::run, url: " << tasksUrl(); - response* result = caldav_get_response(); - CALDAV_RESPONSE res = OK; + result = caldav_get_response(); if (mGetAll) { kdDebug() << "getting all objects"; -- cgit v1.2.1