Code cleanup

This commit is contained in:
2025-12-16 18:23:21 -05:00
parent 5c5f4d7d8f
commit 6d87851117
3 changed files with 5 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ bool ClientSocketSender::sendFile(String &pathFileName)
sendPutIndicator(pathFileName, fileLength); sendPutIndicator(pathFileName, fileLength);
Array<char> readBuffer; Array<char> readBuffer;
readBuffer.size(BUFFER_LENGTH); readBuffer.size(BUFFER_LENGTH);
std::cout << "Sending file " << pathFileName << Utility::byteCountToString(fileLength, false) << std::endl; std::cout << "Sending file " << pathFileName << " " << Utility::byteCountToString(fileLength, false) << std::endl;
while(true) while(true)
{ {
size_t bytesRead = readFile.read(&readBuffer[0], readBuffer.size()); size_t bytesRead = readFile.read(&readBuffer[0], readBuffer.size());

View File

@@ -11,6 +11,8 @@
// To Clean: From the top menu choose "View", "Command Palette", Then choose CMake: Clean OR /usr/bin/cmake --build /home/pi/CPP/sstp/build --config Debug --target clean -- // To Clean: From the top menu choose "View", "Command Palette", Then choose CMake: Clean OR /usr/bin/cmake --build /home/pi/CPP/sstp/build --config Debug --target clean --
// To Build: From the top menu choose "View", "Command Palette", Then choose CMake: Build OR /usr/bin/cmake --build /home/pi/CPP/sstp/build --config Debug --target all -- // To Build: From the top menu choose "View", "Command Palette", Then choose CMake: Build OR /usr/bin/cmake --build /home/pi/CPP/sstp/build --config Debug --target all --
// Output will be here. /home/pi/CPP/sstp/build // Output will be here. /home/pi/CPP/sstp/build
// On Isonoe to receive we will point to the binaries here /home/pi/CPP/sstp/build
// On Adrastea we will point to the binaries here /home/pi/Boneyard/sstp
bool registerSignalHandler(void); // registers a Control-c handler bool registerSignalHandler(void); // registers a Control-c handler
void signalHandler(int signal); // The Control-C handler void signalHandler(int signal); // The Control-C handler
@@ -25,7 +27,7 @@ int main(int argc, char **argv)
{ {
int returnCode(0); int returnCode(0);
Profiler profiler; Profiler profiler;
String version = "1.0.0.7"; // major version, minor version, patch, build String version = "1.0.0.8"; // major version, minor version, patch, build
std::cout << "sstp version " << version.str() << std::endl; std::cout << "sstp version " << version.str() << std::endl;
if(!registerSignalHandler()) if(!registerSignalHandler())

View File

@@ -97,7 +97,7 @@ bool SocketConnectionReceiver::handlePut(Block<String> &commands)
fileName = commands[1]; fileName = commands[1];
fileLength = commands[commands.size()-1].toLong(); fileLength = commands[commands.size()-1].toLong();
std::cout << "PUT" << " " << fileName << " " << Utility::byteCountToString(fileLength) << std::endl; std::cout << "PUT" << " " << fileName << " " << Utility::byteCountToString(fileLength,false) << std::endl;
availableDiskSpace=Utility::getAvailableDiskSpace(String("./")); availableDiskSpace=Utility::getAvailableDiskSpace(String("./"));
std::cout << Utility::byteCountToString(availableDiskSpace,false) << " available space on disk" << std::endl; std::cout << Utility::byteCountToString(availableDiskSpace,false) << " available space on disk" << std::endl;