diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-03-09 23:06:26 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-03-09 23:06:26 (GMT) |
commit | 630b6353cd0efa627a75659a3f790f76b6828650 (patch) | |
tree | 1b5385b13a1e6554db67aa2496192f553537acf9 /Source/CTest/cmCTestSubmit.cxx | |
parent | 83343c59c9e54b74b7343c8b03f8c041d3e9cdd8 (diff) | |
download | CMake-630b6353cd0efa627a75659a3f790f76b6828650.zip CMake-630b6353cd0efa627a75659a3f790f76b6828650.tar.gz CMake-630b6353cd0efa627a75659a3f790f76b6828650.tar.bz2 |
BUG: xmlrpc does the base64 encoding
Diffstat (limited to 'Source/CTest/cmCTestSubmit.cxx')
-rw-r--r-- | Source/CTest/cmCTestSubmit.cxx | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx index 7cea89d..a6f5f93 100644 --- a/Source/CTest/cmCTestSubmit.cxx +++ b/Source/CTest/cmCTestSubmit.cxx @@ -586,8 +586,6 @@ bool cmCTestSubmit::SubmitUsingXMLRPC(const cmStdString& localprefix, } size_t fileSize = st.st_size; - size_t encodedSize = static_cast<size_t>(fileSize * 1.5); // Enough space for base64 - FILE* fp = fopen(local_file.c_str(), "r"); if ( !fp ) { @@ -595,41 +593,20 @@ bool cmCTestSubmit::SubmitUsingXMLRPC(const cmStdString& localprefix, } unsigned char *fileBuffer = new unsigned char[fileSize]; - unsigned char *encodedFileBuffer = new unsigned char[encodedSize]; if ( fread(fileBuffer, 1, fileSize, fp) != fileSize ) { delete [] fileBuffer; - delete [] encodedFileBuffer; fclose(fp); return false; } fclose(fp); - size_t realEncodedSize = cmsysBase64_Encode( - fileBuffer, fileSize, - encodedFileBuffer, 1); - if ( realEncodedSize < fileSize ) - { - return false; - } - - std::cout << "Buffer: ["; - std::cout.write(reinterpret_cast<const char*>(encodedFileBuffer), - realEncodedSize); - std::cout << "]" << std::endl; - - /* - result = xmlrpc_client_call(&env, "http://betty.userland.com/RPC2", - "examples.getStateName", - "(i)", (xmlrpc_int32) cnt++); - */ std::string remoteCommand = remoteprefix + ".put"; result = xmlrpc_client_call(&env, url.c_str(), remoteCommand.c_str(), - "(6)", encodedFileBuffer, (xmlrpc_int32) realEncodedSize); + "(6)", fileBuffer, (xmlrpc_int32)fileSize ); delete [] fileBuffer; - delete [] encodedFileBuffer; if ( env.fault_occurred ) { |