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

index 516659b..99337bc 100644 (file)
@@ -73,26 +73,6 @@ void CardDAV::ProcessDataThread(){
        ServerAddressNormal = wxT("http://") + ServerAddressURL;
        
        ServerAuth = ServerUser + wxT(":") + ServerPass;
-       
-       // Try SSL first.
-
-
-       /*
-       char *ServerAdrSSLChar = new char[(ServerAddressSSL.Length() - 1)];
-       //memset(ServerAdrSSLChar, 0, ServerAddressSSL.Length());
-       strncpy(ServerAdrSSLChar, (const char*)ServerAddressSSL.mb_str(wxConvUTF8), (ServerAddressSSL.Length() - 1));
-       
-       char *ServerAdrNorChar = new char[(ServerAddressNormal.Length() - 1)];
-       //memset(ServerAdrNorChar, 0, ServerAddressSSL.Length());       
-       strncpy(ServerAdrNorChar, (const char*)ServerAddressNormal.mb_str(wxConvUTF8), (ServerAddressNormal.Length() - 1));
-
-       char *ServerAuthChar = new char[(ServerAuth.Length() - 1)];
-       //memset(ServerAuthChar, 0, ServerAddressSSL.Length()); 
-       strncpy(ServerAuthChar, (const char*)ServerAuth.mb_str(wxConvUTF8), (ServerAuth.Length() - 1));
-       
-       */
-
-       //std::string WriteDataString = std::string(ServerUploadData.mb_str());
 
        std::map<int,int>::iterator ActIter;
        struct UploadDataStruc UploadData;
@@ -111,6 +91,8 @@ void CardDAV::ProcessDataThread(){
                curl_easy_setopt(conn, CURLOPT_CUSTOMREQUEST, (const char*)ServerMethod.mb_str(wxConvUTF8));
 
        }
+       
+       // Try SSL first.
 
        if (ServerSSL){
 
@@ -150,14 +132,6 @@ void CardDAV::ProcessDataThread(){
                        curl_easy_setopt(conn, CURLOPT_CAINFO, (const char*)ServerCertFilename.mb_str(wxConvUTF8));
                
                }
-
-               //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);
                
                claconncode = (curl_easy_perform(conn));
 
@@ -212,16 +186,11 @@ void CardDAV::ProcessDataThread(){
                // 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));
@@ -508,7 +477,6 @@ void CardDAV::ProcessDataThread(){
        
        // Catch all.
        
-       //ActIter->second = 1;
        *ServerResult = TRUE;
        return;
 
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