X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcarddav%2Fcarddav-defaultadrurl.cpp;h=b2fec756ec5f46f554f1e13cf528dc487826db58;hb=7195b19cb9b6bac69a55acdffabaec237dc67e78;hp=f258d69a51f58776e2064634ad944194b0a10ef6;hpb=911611528b36f56f7de9b6bf027b4c2a1a54df00;p=xestiaab%2F.git diff --git a/source/carddav/carddav-defaultadrurl.cpp b/source/carddav/carddav-defaultadrurl.cpp index f258d69..b2fec75 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,8 +46,16 @@ wxString CardDAV::GetDefaultAddressBookURL(){ wxString ServerAddressSSL; wxString ServerAddressNormal; + // First: Get the principal UID address. + conn = curl_easy_init(); + +#if defined(__APPLE__) + + SetConnectionObject(conn); +#endif + struct curl_slist *connhd = NULL; struct curl_slist *connhd2 = NULL; struct curl_slist *connhd3 = NULL; @@ -146,6 +172,12 @@ wxString CardDAV::GetDefaultAddressBookURL(){ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 0L); } +#if defined(__APPLE__) + + SetConnectionObject(conn); + +#endif + conncode = (curl_easy_perform(conn)); if (conncode == CURLE_OK){ @@ -333,6 +365,12 @@ wxString CardDAV::GetDefaultAddressBookURL(){ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 0L); } +#if defined(__APPLE__) + + SetConnectionObject(conn); + +#endif + conncode = (curl_easy_perform(conn)); if (conncode == CURLE_OK){ @@ -509,6 +547,12 @@ wxString CardDAV::GetDefaultAddressBookURL(){ curl_easy_setopt(conn, CURLOPT_SSL_VERIFYHOST, 0L); } +#if defined(__APPLE__) + + SetConnectionObject(conn); + +#endif + conncode = (curl_easy_perform(conn)); if (conncode == CURLE_OK){