X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcarddav%2Fcarddav-connect.cpp;h=71134e78d7cc4002bfd9037c55a4fe2af9fa09d3;hb=072c524faf30f84a30bf0fd40b2580d199967e74;hp=d759cdec0be235373642486335edb849a245ba78;hpb=911611528b36f56f7de9b6bf027b4c2a1a54df00;p=xestiaab%2F.git diff --git a/source/carddav/carddav-connect.cpp b/source/carddav/carddav-connect.cpp index d759cde..71134e7 100644 --- a/source/carddav/carddav-connect.cpp +++ b/source/carddav/carddav-connect.cpp @@ -1,3 +1,21 @@ +// carddav-connect.cpp - CardDAV Object - Connect subroutines. +// +// (c) 2012-2015 Xestia Software Development. +// +// This file is part of Xestia Address Book. +// +// Xestia Address Book is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by the +// Free Software Foundation, version 3 of the license. +// +// Xestia Address Book is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with Xestia Address Book. If not, see + #include "carddav.h" #include "../version.h" #include @@ -12,6 +30,8 @@ bool CardDAV::Connect(){ + // Connect to the CardDAV server. + PageData.Clear(); PageHeader.Clear(); @@ -52,22 +72,6 @@ bool CardDAV::Connect(){ // 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)); - - */ - if (ServerSSL){ union { @@ -127,6 +131,8 @@ bool CardDAV::Connect(){ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 0L); } + SetConnectionObject(conn); + conncode = (curl_easy_perform(conn)); ptr.certdata = NULL;