comparison Core/HttpClient.cpp @ 3379:974e12006b7d

Removed extern "C" qualifier around function that is internally linked (extern "C" having thus no effect) AND throws exceptions (thus may NOT be extern "C").
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 17 May 2019 08:42:24 +0200
parents 7569d3dc1c20
children af9432e46c07
comparison
equal deleted inserted replaced
3378:596cfabd72c5 3379:974e12006b7d
66 << " in libcurl: " << curl_easy_strerror(code); 66 << " in libcurl: " << curl_easy_strerror(code);
67 *status = 0; 67 *status = 0;
68 return code; 68 return code;
69 } 69 }
70 } 70 }
71 71 }
72 // This is a dummy wrapper function to suppress any OpenSSL-related 72
73 // problem in valgrind. Inlining is prevented. 73 // This is a dummy wrapper function to suppress any OpenSSL-related
74 // problem in valgrind. Inlining is prevented.
74 #if defined(__GNUC__) || defined(__clang__) 75 #if defined(__GNUC__) || defined(__clang__)
75 __attribute__((noinline)) 76 __attribute__((noinline))
76 #endif 77 #endif
77 static CURLcode OrthancHttpClientPerformSSL(CURL* curl, long* status) 78 static CURLcode OrthancHttpClientPerformSSL(CURL* curl, long* status)
78 { 79 {
79 #if ORTHANC_ENABLE_SSL == 1 80 #if ORTHANC_ENABLE_SSL == 1
80 return GetHttpStatus(curl_easy_perform(curl), curl, status); 81 return GetHttpStatus(curl_easy_perform(curl), curl, status);
81 #else 82 #else
82 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, 83 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError,
83 "Orthanc was compiled without SSL support, " 84 "Orthanc was compiled without SSL support, "
84 "cannot make HTTPS request"); 85 "cannot make HTTPS request");
85 #endif 86 #endif
86 }
87 } 87 }
88 88
89 89
90 90
91 namespace Orthanc 91 namespace Orthanc