From 41edff01c68e3884c3ecd3ac904253b56783e44a Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 13 Mar 2016 09:33:23 +0000 Subject: [PATCH] Removed commented out code in carddav/carddav-contactlist.cpp --- source/carddav/carddav-contactlist.cpp | 45 ++------------------------ 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/source/carddav/carddav-contactlist.cpp b/source/carddav/carddav-contactlist.cpp index 2b69d6e..16acdb5 100644 --- a/source/carddav/carddav-contactlist.cpp +++ b/source/carddav/carddav-contactlist.cpp @@ -87,10 +87,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ SyncData.Append(wxT("\n")); SyncData.Append(wxT("")); - //SyncData.Trim(); - //SyncData.Append(wxT("data:,00378c55-1f44-44a2-a255-84f6560b5cac_580")); SyncData.Append(SyncTokenInc); - //SyncData.Trim(); SyncData.Append(wxT("\n")); SyncData.Append(wxT("1\n")); SyncData.Append(wxT("\n")); @@ -115,18 +112,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ SyncDataBuffer = SyncData.ToUTF8(); } - - //static const char* query = SyncData.mb_str(); - - /*char *query = "\n\ - \n\ - data:,00378c55-1f44-44a2-a255-84f6560b5cac_580\n\ - 1\n\ - \n\ - \n\ - \n\ - \n";*/ + const char* query = SyncDataBuffer.data(); // Try SSL first. @@ -172,13 +158,6 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ } - //UploadData.readptr = &CardDAVDataQuery; - //UploadData.sizeleft = CardDAVDataQuery.Len(); - //curl_easy_setopt(conn, CURLOPT_UPLOAD, 1); - //curl_easy_setopt(conn, CURLOPT_READDATA, &UploadData); - //curl_easy_setopt(conn, CURLOPT_READFUNCTION, UploadReadFunc); - - //curl_easy_setopt(conn, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(conn, CURLOPT_POSTFIELDS, query); curl_easy_setopt(conn, CURLOPT_POSTFIELDSIZE, strlen(query)); @@ -230,16 +209,11 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ // the certificates as PEM files. if (claconncode == CURLE_SSL_CACERT && wxFile::Exists(ServerCertFilename) == TRUE){ - - //curl_easy_cleanup(conn); - //conn = curl_easy_init(); CURL *sslerrconn; sslerrconn = curl_easy_init(); CURLcode sslerrconncode; - - //claconncode = (curl_easy_perform(conn)); - + wxString ServerAddressOnly = wxT("https://") + ServerAddress + wxT(":") + wxString::Format(wxT("%i"), ServerPort) + wxT("/"); curl_easy_setopt(sslerrconn, CURLOPT_URL, (const char*)ServerAddressOnly.mb_str(wxConvUTF8)); @@ -423,14 +397,6 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ curl_easy_setopt(conn, CURLOPT_CUSTOMREQUEST, "REPORT"); curl_easy_setopt(conn, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(conn, CURLOPT_HTTPHEADER, slist); - - //UploadData.readptr = &CardDAVDataQuery; - //UploadData.sizeleft = CardDAVDataQuery.Len(); - //curl_easy_setopt(conn, CURLOPT_UPLOAD, 1); - //curl_easy_setopt(conn, CURLOPT_READDATA, &UploadData); - //curl_easy_setopt(conn, CURLOPT_READFUNCTION, UploadReadFunc); - - //curl_easy_setopt(conn, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(conn, CURLOPT_POSTFIELDS, query); curl_easy_setopt(conn, CURLOPT_POSTFIELDSIZE, strlen(query)); @@ -930,13 +896,6 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ SleepFor(2000000000); - /*timespec n1, n2; - - n1.tv_sec = 0; - n1.tv_nsec = 2000000000L; - - nanosleep(&n1, &n2);*/ - xmlFreeDoc(xmlCardDAVDoc); curl_easy_cleanup(conn); -- 2.39.5