|
@@ -96,13 +96,11 @@ CmdMan::CmdRet CmdMan::cmdPut(vector<string> args) {
|
|
|
root["command"] = "put";
|
|
|
root["file"] = fileman.getPutName();
|
|
|
if (opened) {
|
|
|
- root["command"] = "put";
|
|
|
- root["file"] = fileman.getPutName();
|
|
|
root["size"] = fileman.getPutSize();
|
|
|
root["chunks"] = fileman.getPutChunks();
|
|
|
retval.type = send;
|
|
|
} else {
|
|
|
- retval.type = print | error;
|
|
|
+ retval.type = error;
|
|
|
root["accept"] = false;
|
|
|
root["error"] = "couldnt open local file \"" + args[0] + "\"";
|
|
|
}
|
|
@@ -173,7 +171,6 @@ CmdMan::CmdRet CmdMan::cmdList(vector<string> args) {
|
|
|
root["command"] = "list";
|
|
|
if (opened) {
|
|
|
retval.type = send;
|
|
|
- retval.msg = root;
|
|
|
} else {
|
|
|
retval.type = error;
|
|
|
root["accept"] = false;
|
|
@@ -181,6 +178,7 @@ CmdMan::CmdRet CmdMan::cmdList(vector<string> args) {
|
|
|
root["error"] = "cannot list, already listing";
|
|
|
}
|
|
|
|
|
|
+ retval.msg = root;
|
|
|
return retval;
|
|
|
}
|
|
|
|