Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-12-20 18:48:13 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-12-20 18:48:13 +0300
commit377c058a190a53a680b32a3e3cfbe60aca843edd (patch)
tree1bd0f88df68638c9736fc5936ef93e2c25ddc518 /src/Networking/FtpResponder.cpp
parentc567e0f1f60a5eaa8afed23d8abef796aeb58c2f (diff)
On the way to 2.02RC7
HTML responder changes for new DWC Failure to delete a file no longer generates a global error message if the reason is that the file or path was not found. This was done for the Cura upload plugin, and also means that the 'silent' parameter to the delete call is no longer needed.
Diffstat (limited to 'src/Networking/FtpResponder.cpp')
-rw-r--r--src/Networking/FtpResponder.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/Networking/FtpResponder.cpp b/src/Networking/FtpResponder.cpp
index d7c8e9ef..4eefc7d9 100644
--- a/src/Networking/FtpResponder.cpp
+++ b/src/Networking/FtpResponder.cpp
@@ -470,7 +470,7 @@ void FtpResponder::ProcessLine()
}
}
// end connection
- else if (StringEquals(clientMessage, "QUIT"))
+ else if (StringEqualsIgnoreCase(clientMessage, "QUIT"))
{
outBuf->copy("221 Goodbye.\r\n");
Commit();
@@ -485,13 +485,13 @@ void FtpResponder::ProcessLine()
case ResponderState::reading:
// get system type
- if (StringEquals(clientMessage, "SYST"))
+ if (StringEqualsIgnoreCase(clientMessage, "SYST"))
{
outBuf->copy("215 UNIX Type: L8\r\n");
Commit(ResponderState::reading);
}
// get features
- else if (StringEquals(clientMessage, "FEAT"))
+ else if (StringEqualsIgnoreCase(clientMessage, "FEAT"))
{
outBuf->copy( "211-Features:\r\n"
"PASV\r\n" // support PASV mode
@@ -500,7 +500,7 @@ void FtpResponder::ProcessLine()
Commit(ResponderState::reading);
}
// get current dir
- else if (StringEquals(clientMessage, "PWD"))
+ else if (StringEqualsIgnoreCase(clientMessage, "PWD"))
{
outBuf->printf("257 \"%s\"\r\n", currentDirectory);
Commit(ResponderState::reading);
@@ -512,7 +512,7 @@ void FtpResponder::ProcessLine()
ChangeDirectory(directory);
}
// change to parent of current directory
- else if (StringEquals(clientMessage, "CDUP"))
+ else if (StringEqualsIgnoreCase(clientMessage, "CDUP"))
{
ChangeDirectory("..");
}
@@ -520,11 +520,11 @@ void FtpResponder::ProcessLine()
else if (StringStartsWith(clientMessage, "TYPE"))
{
const char *type = GetParameter("TYPE");
- if (StringEquals(type, "I"))
+ if (StringEqualsIgnoreCase(type, "I"))
{
outBuf->copy("200 Switching to Binary mode.\r\n");
}
- else if (StringEquals(type, "A"))
+ else if (StringEqualsIgnoreCase(type, "A"))
{
outBuf->copy("200 Switching to ASCII mode.\r\n");
}
@@ -535,7 +535,7 @@ void FtpResponder::ProcessLine()
Commit(ResponderState::reading);
}
// enter passive mode mode
- else if (StringEquals(clientMessage, "PASV"))
+ else if (StringEqualsIgnoreCase(clientMessage, "PASV"))
{
// reset error conditions
uploadError = sendError = false;
@@ -641,13 +641,13 @@ void FtpResponder::ProcessLine()
Commit(ResponderState::reading);
}
// no op
- else if (StringEquals(clientMessage, "NOOP"))
+ else if (StringEqualsIgnoreCase(clientMessage, "NOOP"))
{
outBuf->copy("200 NOOP okay.\r\n");
Commit(ResponderState::reading);
}
// end connection
- else if (StringEquals(clientMessage, "QUIT"))
+ else if (StringEqualsIgnoreCase(clientMessage, "QUIT"))
{
outBuf->copy("221 Goodbye.\r\n");
Commit();
@@ -688,11 +688,11 @@ void FtpResponder::ProcessLine()
else if (StringStartsWith(clientMessage, "TYPE"))
{
const char *type = GetParameter("TYPE");
- if (StringEquals(type, "I"))
+ if (StringEqualsIgnoreCase(type, "I"))
{
outBuf->copy("200 Switching to Binary mode.\r\n");
}
- else if (StringEquals(type, "A"))
+ else if (StringEqualsIgnoreCase(type, "A"))
{
outBuf->copy("200 Switching to ASCII mode.\r\n");
}
@@ -737,7 +737,7 @@ void FtpResponder::ProcessLine()
}
}
// abort current operation
- else if (StringEquals(clientMessage, "ABOR"))
+ else if (StringEqualsIgnoreCase(clientMessage, "ABOR"))
{
CloseDataPort();
@@ -745,7 +745,7 @@ void FtpResponder::ProcessLine()
Commit(ResponderState::reading);
}
// end connection
- else if (StringEquals(clientMessage, "QUIT"))
+ else if (StringEqualsIgnoreCase(clientMessage, "QUIT"))
{
CloseDataPort();
@@ -763,7 +763,7 @@ void FtpResponder::ProcessLine()
case ResponderState::uploading:
case ResponderState::sendingPasvData:
// abort current transfer
- if (StringEquals(clientMessage, "ABOR"))
+ if (StringEqualsIgnoreCase(clientMessage, "ABOR"))
{
CancelUpload();
CloseDataPort();
@@ -812,14 +812,14 @@ void FtpResponder::ChangeDirectory(const char *newDirectory)
{
combinedPath.copy(newDirectory);
}
- else if (StringEquals(newDirectory, "."))
+ else if (StringEqualsIgnoreCase(newDirectory, "."))
{
combinedPath.copy(currentDirectory);
}
- else if (StringEquals(newDirectory, "..")) // Go up
+ else if (StringEqualsIgnoreCase(newDirectory, "..")) // Go up
{
// Check if we're already at the root directory
- if (StringEquals(currentDirectory, "/"))
+ if (StringEqualsIgnoreCase(currentDirectory, "/"))
{
outBuf->copy("550 Failed to change directory.\r\n");
Commit(responderState);