summaryrefslogtreecommitdiff
path: root/editor/fileserver
diff options
context:
space:
mode:
Diffstat (limited to 'editor/fileserver')
-rw-r--r--editor/fileserver/editor_file_server.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index a218070933..28b1095256 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -34,9 +34,10 @@
#include "io/marshalls.h"
//#define DEBUG_PRINT(m_p) print_line(m_p)
-#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec());
+//#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec());
-//#define DEBUG_TIME(m_what)
+#define DEBUG_PRINT(m_what)
+#define DEBUG_TIME(m_what)
void EditorFileServer::_close_client(ClientData *cd) {
@@ -78,7 +79,7 @@ void EditorFileServer::_subthread_start(void *s) {
_close_client(cd);
ERR_FAIL_COND(err != OK);
}
- passutf8[passlen] = 0;
+ passutf8.write[passlen] = 0;
String s;
s.parse_utf8(passutf8.ptr());
if (s != cd->efs->password) {
@@ -107,7 +108,6 @@ void EditorFileServer::_subthread_start(void *s) {
//wait for ID
err = cd->connection->get_data(buf4, 4);
- //#define DEBUG_PRINT(m_p) print_line(m_p)
DEBUG_TIME("get_data")
if (err != OK) {
@@ -145,18 +145,18 @@ void EditorFileServer::_subthread_start(void *s) {
_close_client(cd);
ERR_FAIL_COND(err != OK);
}
- fileutf8[namelen] = 0;
+ fileutf8.write[namelen] = 0;
String s;
s.parse_utf8(fileutf8.ptr());
if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) {
- print_line("FILE EXISTS: " + s);
+ DEBUG_PRINT("FILE EXISTS: " + s);
}
if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) {
- print_line("MOD TIME: " + s);
+ DEBUG_PRINT("MOD TIME: " + s);
}
if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) {
- print_line("OPEN: " + s);
+ DEBUG_PRINT("OPEN: " + s);
}
if (!s.begins_with("res://")) {
@@ -243,7 +243,7 @@ void EditorFileServer::_subthread_start(void *s) {
int read = cd->files[id]->get_buffer(buf.ptrw(), blocklen);
ERR_CONTINUE(read < 0);
- print_line("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen));
+ DEBUG_PRINT("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen));
//not found, continue
encode_uint32(id, buf4);
@@ -259,7 +259,7 @@ void EditorFileServer::_subthread_start(void *s) {
} break;
case FileAccessNetwork::COMMAND_CLOSE: {
- print_line("CLOSED");
+ DEBUG_PRINT("CLOSED");
ERR_CONTINUE(!cd->files.has(id));
memdelete(cd->files[id]);
cd->files.erase(id);