diff --git a/common/utility.hpp b/common/utility.hpp index 85be83e..3c6f388 100644 --- a/common/utility.hpp +++ b/common/utility.hpp @@ -176,18 +176,6 @@ bool Utility::fmod(double dividend, double divisor) return std::fabs(remainder) < epsilon; } -// inline -// size_t Utility::getAvailableDiskSpace(const String& path) -// { -// struct statvfs stat; -// if (::statvfs(path, &stat) != 0) -// { -// throw new Exception("Error calling statvfs to get available disk space."); -// } -// // Calculate available space in bytes. Multiply Number of free inodes * Fragment size -// return (size_t)stat.f_bavail * stat.f_frsize; -// } - inline size_t Utility::getAvailableDiskSpace(const String& path) { diff --git a/sstp/clientsocketsender.cpp b/sstp/clientsocketsender.cpp index 4ba2530..60cbdfc 100644 --- a/sstp/clientsocketsender.cpp +++ b/sstp/clientsocketsender.cpp @@ -1,4 +1,5 @@ #include +#include /// @brief This is to provide a definition for SmartPointer ClientSocketSender::ClientSocketSender() @@ -69,6 +70,7 @@ bool ClientSocketSender::sendFile(String &pathFileName) sendPutIndicator(pathFileName, fileLength); Array readBuffer; readBuffer.size(BUFFER_LENGTH); + std::cout << "Sending file " << pathFileName << Utility::byteCountToString(fileLength, false) << std::endl; while(true) { size_t bytesRead = readFile.read(&readBuffer[0], readBuffer.size()); diff --git a/sstp/main.cpp b/sstp/main.cpp index 05d904b..460ff45 100644 --- a/sstp/main.cpp +++ b/sstp/main.cpp @@ -25,7 +25,7 @@ int main(int argc, char **argv) { int returnCode(0); Profiler profiler; - String version = "1.0.0.6"; // major version, minor version, patch, build + String version = "1.0.0.7"; // major version, minor version, patch, build std::cout << "sstp version " << version.str() << std::endl; if(!registerSignalHandler()) diff --git a/sstp/socketconnectionreceiver.cpp b/sstp/socketconnectionreceiver.cpp index 0117b35..653ff1f 100644 --- a/sstp/socketconnectionreceiver.cpp +++ b/sstp/socketconnectionreceiver.cpp @@ -149,7 +149,7 @@ bool SocketConnectionReceiver::handlePut(Block &commands) double elapsedTimeSeconds = profiler.elapsed()/1000.00; double bytesPerSecond = totalBytesRead / elapsedTimeSeconds; String strBytesPerSecond = Utility::byteCountToString(bytesPerSecond); - std::cout << "Transferred " << Utility::byteCountToString(totalBytesRead,false) << " of " << Utility::byteCountToString(fileLength,false) << " " << percent << " percent " << strBytesPerSecond << std::endl; + std::cout << "Received " << Utility::byteCountToString(totalBytesRead,false) << " of " << Utility::byteCountToString(fileLength,false) << " " << percent << " percent " << strBytesPerSecond << std::endl; } } writeFile.close();