summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-02-07 16:03:44 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-02-07 16:03:44 (GMT)
commit579945c2e76e6b0228896a72213c37888509ad75 (patch)
tree09b9bd92e18f7d32354535045b3271a888969613 /Source
parenta5f5f63c273163dd7a8aef5fb879cb140e749634 (diff)
downloadCMake-579945c2e76e6b0228896a72213c37888509ad75.zip
CMake-579945c2e76e6b0228896a72213c37888509ad75.tar.gz
CMake-579945c2e76e6b0228896a72213c37888509ad75.tar.bz2
Do not reuse connection as that feature seems to be broken
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestSubmit.cxx52
1 files changed, 26 insertions, 26 deletions
diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx
index d3ef0ae..dd9c469 100644
--- a/Source/CTest/cmCTestSubmit.cxx
+++ b/Source/CTest/cmCTestSubmit.cxx
@@ -98,36 +98,36 @@ bool cmCTestSubmit::SubmitUsingFTP(const std::string& localprefix,
/* In windows, this will init the winsock stuff */
::curl_global_init(CURL_GLOBAL_ALL);
- /* get a curl handle */
- curl = curl_easy_init();
- if(curl)
+ std::string::size_type cc;
+ for ( cc = 0; cc < files.size(); cc ++ )
{
- // Using proxy
- if ( m_FTPProxyType > 0 )
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl)
{
- curl_easy_setopt(curl, CURLOPT_PROXY, m_FTPProxy.c_str());
- switch (m_FTPProxyType)
+ // Using proxy
+ if ( m_FTPProxyType > 0 )
{
- case 2:
- curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
- break;
- case 3:
- curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
- break;
- default:
- curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ curl_easy_setopt(curl, CURLOPT_PROXY, m_FTPProxy.c_str());
+ switch (m_FTPProxyType)
+ {
+ case 2:
+ curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
+ break;
+ case 3:
+ curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
+ break;
+ default:
+ curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ }
}
- }
-
- // enable uploading
- ::curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
-
- std::string::size_type cc;
- for ( cc = 0; cc < files.size(); cc ++ )
- {
+
+ // enable uploading
+ ::curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
+
std::string local_file = localprefix + "/" + files[cc];
std::string upload_as = url + "/" + remoteprefix + files[cc];
-
+
struct stat st;
if ( ::stat(local_file.c_str(), &st) )
{
@@ -158,9 +158,9 @@ bool cmCTestSubmit::SubmitUsingFTP(const std::string& localprefix,
::curl_global_cleanup();
return false;
}
+ // always cleanup
+ ::curl_easy_cleanup(curl);
}
- // always cleanup
- ::curl_easy_cleanup(curl);
}
::curl_global_cleanup();
return true;