- // Restore the original settings.
-
- string OriginalServerAddress = BuildServerAddress(&ConnectionData, "/principals");
- curl_easy_setopt(ConnectionHandle, CURLOPT_URL, OriginalServerAddress.c_str());
- curl_easy_setopt(ConnectionHandle, CURLOPT_CUSTOMREQUEST, NULL);
- curl_easy_setopt(ConnectionHandle, CURLOPT_UPLOAD, 0L);
- curl_easy_setopt(ConnectionHandle, CURLOPT_READDATA, NULL);
- curl_easy_setopt(ConnectionHandle, CURLOPT_READFUNCTION, NULL);
-
- // Process the received XML data into a list of calendars
- // and locations.
+ 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);