Get File doesn't work properly
The server replies with "download already running" or "local file already exists" when trying to download a second file. File get's downloaded anyways.
GUI Test
LOG File Downloads - No File was downloaded at the start of the program
tobias@devbox:~/dev/ccats/gui/build$ ./CCats-GUI
"ip 0.0.0.0 machine mode is 1 file is "
"{\"accept\":false,\"address\":\"0.0.0.0\",\"command\":\"connect\",\"error\":\"Connection refused\",\"port\":1234}"
"Received command connect"
"done"
"ip 0.0.0.0 machine mode is 1 file is "
"{\"accept\":true,\"address\":\"0.0.0.0\",\"command\":\"connect\",\"error\":\"\",\"port\":1234}"
"Received command connect"
"{\"accept\":true,\"clientversion\":\"0.2\",\"command\":\"version\",\"serverversion\":\"0.2\"}"
"Received command version"
"login user pass"
"{\"accept\":true,\"command\":\"login\",\"error\":\"\"}"
"Received command login"
"list"
"{\"accept\":true,\"command\":\"list\",\"names\":[\"4\",\"2\",\"3\",\".vboxclient-seamless.pid\",\"1\",\"5\"]}"
"Received command list"
"get 1"
"{\"accept\":true,\"command\":\"get\",\"error\":\"\",\"file\":\"1\"}"
"Received command get"
"{\"cancel\":false,\"command\":\"getdata\",\"error\":\"\",\"file\":\"1\",\"speed\":0}"
"Received command getdata"
"get 2"
"{\"accept\":false,\"command\":\"get\",\"error\":\"Server reports: download already running\",\"file\":\"2\"}"
"Received command get"
"get 3"
"{\"accept\":false,\"command\":\"get\",\"error\":\"local file \\\"3\\\" already exists\",\"file\":\"3\"}"
"Received command get"
"get 4"
"{\"accept\":false,\"command\":\"get\",\"error\":\"Server reports: download already running\",\"file\":\"4\"}"
"Received command get"
"get 5"
"{\"accept\":false,\"command\":\"get\",\"error\":\"local file \\\"5\\\" already exists\",\"file\":\"5\"}"
"Received command get"
CLI Test:
get 3
{"accept":false,"command":"get","error":"local file \"3\" already exists","file":"3"}
get 3
{"accept":false,"command":"get","error":"Server reports: download already running","file":"3"}
get 3
{"accept":false,"command":"get","error":"local file \"3\" already exists","file":"3"}
get 3
{"accept":false,"command":"get","error":"Server reports: download already running","file":"3"}
get 3
{"accept":false,"command":"get","error":"local file \"3\" already exists","file":"3"}
get 3
{"accept":false,"command":"get","error":"Server reports: download already running","file":"3"}
get 3
{"accept":false,"command":"get","error":"local file \"3\" already exists","file":"3"}
Edited by Wach, Tobias Alexander