Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Removed commented out code in carddav/carddav-contactlist.cpp
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 13 Mar 2016 09:33:23 +0000 (09:33 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 13 Mar 2016 09:33:23 +0000 (09:33 +0000)
source/carddav/carddav-contactlist.cpp

index 2b69d6e..16acdb5 100644 (file)
@@ -87,10 +87,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){
                SyncData.Append(wxT("<D:sync-collection xmlns:D=\"DAV:\"\n"));
                SyncData.Append(wxT(" xmlns:C=\"urn:ietf:params:xml:ns:carddav\">\n"));
                SyncData.Append(wxT("<D:sync-token>"));
-               //SyncData.Trim();
-               //SyncData.Append(wxT("data:,00378c55-1f44-44a2-a255-84f6560b5cac_580"));
                SyncData.Append(SyncTokenInc);
-               //SyncData.Trim();
                SyncData.Append(wxT("</D:sync-token>\n"));
                SyncData.Append(wxT("<D:sync-level>1</D:sync-level>\n"));
                SyncData.Append(wxT("<D:prop>\n"));
@@ -115,18 +112,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){
                SyncDataBuffer = SyncData.ToUTF8();
 
        }
-       
-       //static const char* query = SyncData.mb_str();
-       
-       /*char *query = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\
-               <D:sync-collection xmlns:D=\"DAV:\"\n\
-                xmlns:C=\"urn:ietf:params:xml:ns:carddav\">\n\
-               <D:sync-token>data:,00378c55-1f44-44a2-a255-84f6560b5cac_580</D:sync-token>\n\
-               <D:sync-level>1</D:sync-level>\n\
-               <D:prop>\n\
-                       <D:getetag/>\n\
-               </D:prop>\n\
-       </D:sync-collection>\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);
 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy