From 7f11c54cda362572e6d7bfe277d5ecd41de84532 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Thu, 3 Mar 2016 03:48:57 +0000 Subject: [PATCH] Set the connection results after attempting to fetch data in GetServerSupport. --- source/objects/CalDAV/CalDAV.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/objects/CalDAV/CalDAV.cpp b/source/objects/CalDAV/CalDAV.cpp index bb45429..6e1d0e6 100644 --- a/source/objects/CalDAV/CalDAV.cpp +++ b/source/objects/CalDAV/CalDAV.cpp @@ -172,6 +172,16 @@ CalDAVServerSupport CalDAV::GetServerSupport(){ CURLcode ServerResult = curl_easy_perform(ConnectionHandle); + // Set the results. + + if (ServerResult == CURLE_OK){ + ConnectionServerResult.Result = CALDAVQUERYRESULT_OK; + } else { + ConnectionServerResult.Result = CALDAVQUERYRESULT_SERVERERROR; + } + ConnectionServerResult.Code = ServerResult; + curl_easy_getinfo(ConnectionHandle, CURLINFO_RESPONSE_CODE, &ConnectionServerResult.HTTPCode); + if (ServerResult != CURLE_OK){ return ServerStatus; } -- 2.39.2