X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcarddav%2Fcarddav-defaultadrurl.cpp;h=6ed3aa5e007d63140f7762df1dd2878a8fc2529a;hb=072c524faf30f84a30bf0fd40b2580d199967e74;hp=f258d69a51f58776e2064634ad944194b0a10ef6;hpb=911611528b36f56f7de9b6bf027b4c2a1a54df00;p=xestiaab%2F.git diff --git a/source/carddav/carddav-defaultadrurl.cpp b/source/carddav/carddav-defaultadrurl.cpp index f258d69..6ed3aa5 100644 --- a/source/carddav/carddav-defaultadrurl.cpp +++ b/source/carddav/carddav-defaultadrurl.cpp @@ -1,3 +1,21 @@ +// carddav-defaultadrurl.cpp - CardDAV Object - Default Address URL 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,7 +30,7 @@ wxString CardDAV::GetDefaultAddressBookURL(){ - // First: Get the principal UID address. + // Get the default address book URL. PageData.Clear(); PageHeader.Clear(); @@ -28,7 +46,11 @@ wxString CardDAV::GetDefaultAddressBookURL(){ wxString ServerAddressSSL; wxString ServerAddressNormal; + // First: Get the principal UID address. + conn = curl_easy_init(); + + SetConnectionObject(conn); struct curl_slist *connhd = NULL; struct curl_slist *connhd2 = NULL; @@ -146,6 +168,8 @@ wxString CardDAV::GetDefaultAddressBookURL(){ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 0L); } + SetConnectionObject(conn); + conncode = (curl_easy_perform(conn)); if (conncode == CURLE_OK){ @@ -333,6 +357,8 @@ wxString CardDAV::GetDefaultAddressBookURL(){ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 0L); } + SetConnectionObject(conn); + conncode = (curl_easy_perform(conn)); if (conncode == CURLE_OK){ @@ -509,6 +535,8 @@ wxString CardDAV::GetDefaultAddressBookURL(){ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 0L); } + SetConnectionObject(conn); + conncode = (curl_easy_perform(conn)); if (conncode == CURLE_OK){