From bd6b90359c654f4c75964755e476a8bfd90114ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 30 Aug 2017 08:09:41 +0200 Subject: [PATCH] Remove DSTACK support (#6346) Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug. --- src/client.cpp | 16 ---- src/client/keys.h | 2 - src/clientenvironment.cpp | 3 - src/clientiface.cpp | 3 - src/clientmap.cpp | 3 - src/debug.cpp | 133 ------------------------------ src/debug.h | 30 ------- src/emerge.cpp | 1 - src/game.cpp | 10 --- src/guiKeyChangeMenu.cpp | 2 - src/httpfetch.cpp | 2 - src/inventory.cpp | 6 +- src/inventorymanager.cpp | 2 - src/main.cpp | 5 -- src/map.cpp | 28 ------- src/mesh_generator_thread.cpp | 2 - src/server.cpp | 68 --------------- src/serverenvironment.cpp | 5 -- src/settings_translation_file.cpp | 2 - src/unittest/test.cpp | 2 - src/unittest/test_connection.cpp | 2 - src/util/thread.h | 1 - 22 files changed, 1 insertion(+), 327 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 6fd007181..09ac5196d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -252,8 +252,6 @@ Client::~Client() void Client::connect(Address address, bool is_local_server) { - DSTACK(FUNCTION_NAME); - initLocalMapSaving(address, m_address_name, is_local_server); m_con->SetTimeoutMs(0); @@ -262,8 +260,6 @@ void Client::connect(Address address, bool is_local_server) void Client::step(float dtime) { - DSTACK(FUNCTION_NAME); - // Limit a bit if(dtime > 2.0) dtime = 2.0; @@ -773,7 +769,6 @@ void Client::initLocalMapSaving(const Address &address, void Client::ReceiveAll() { - DSTACK(FUNCTION_NAME); u64 start_ms = porting::getTimeMs(); for(;;) { @@ -799,7 +794,6 @@ void Client::ReceiveAll() void Client::Receive() { - DSTACK(FUNCTION_NAME); NetworkPacket pkt; m_con->Receive(&pkt); ProcessData(&pkt); @@ -816,8 +810,6 @@ inline void Client::handleCommand(NetworkPacket* pkt) */ void Client::ProcessData(NetworkPacket *pkt) { - DSTACK(FUNCTION_NAME); - ToClientCommand command = (ToClientCommand) pkt->getCommand(); u32 sender_peer_id = pkt->getPeerId(); @@ -1235,8 +1227,6 @@ void Client::sendChangePassword(const std::string &oldpassword, void Client::sendDamage(u8 damage) { - DSTACK(FUNCTION_NAME); - NetworkPacket pkt(TOSERVER_DAMAGE, sizeof(u8)); pkt << damage; Send(&pkt); @@ -1244,8 +1234,6 @@ void Client::sendDamage(u8 damage) void Client::sendBreath(u16 breath) { - DSTACK(FUNCTION_NAME); - // Protocol v29 make this obsolete if (m_proto_ver >= 29) return; @@ -1257,16 +1245,12 @@ void Client::sendBreath(u16 breath) void Client::sendRespawn() { - DSTACK(FUNCTION_NAME); - NetworkPacket pkt(TOSERVER_RESPAWN, 0); Send(&pkt); } void Client::sendReady() { - DSTACK(FUNCTION_NAME); - NetworkPacket pkt(TOSERVER_CLIENT_READY, 1 + 1 + 1 + 1 + 2 + sizeof(char) * strlen(g_version_hash)); diff --git a/src/client/keys.h b/src/client/keys.h index 7ee286799..9b8e50358 100644 --- a/src/client/keys.h +++ b/src/client/keys.h @@ -73,8 +73,6 @@ public: QUICKTUNE_INC, QUICKTUNE_DEC, - DEBUG_STACKS, - // hotbar SLOT_1, SLOT_2, diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp index 2a5adea75..c409c3528 100644 --- a/src/clientenvironment.cpp +++ b/src/clientenvironment.cpp @@ -79,7 +79,6 @@ ClientMap & ClientEnvironment::getClientMap() void ClientEnvironment::setLocalPlayer(LocalPlayer *player) { - DSTACK(FUNCTION_NAME); /* It is a failure if already is a local player */ @@ -91,8 +90,6 @@ void ClientEnvironment::setLocalPlayer(LocalPlayer *player) void ClientEnvironment::step(float dtime) { - DSTACK(FUNCTION_NAME); - /* Step time of day */ stepTimeOfDay(dtime); diff --git a/src/clientiface.cpp b/src/clientiface.cpp index 585c1cdc6..8a93b84ac 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -66,9 +66,6 @@ void RemoteClient::GetNextBlocks ( float dtime, std::vector &dest) { - DSTACK(FUNCTION_NAME); - - // Increment timers m_nothing_to_send_pause_timer -= dtime; m_nearest_unsent_reset_timer += dtime; diff --git a/src/clientmap.cpp b/src/clientmap.cpp index d0e08fdbf..d21016f45 100644 --- a/src/clientmap.cpp +++ b/src/clientmap.cpp @@ -62,7 +62,6 @@ ClientMap::ClientMap( MapSector * ClientMap::emergeSector(v2s16 p2d) { - DSTACK(FUNCTION_NAME); // Check that it doesn't exist already try { return getSectorNoGenerate(p2d); @@ -303,8 +302,6 @@ struct MeshBufListList void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass) { - DSTACK(FUNCTION_NAME); - bool is_transparent_pass = pass == scene::ESNRP_TRANSPARENT; std::string prefix; diff --git a/src/debug.cpp b/src/debug.cpp index bdd4146ca..1a467265c 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -56,8 +56,6 @@ void sanity_check_fn(const char *assertion, const char *file, errorstream << file << ":" << line << ": " << function << ": An engine assumption '" << assertion << "' failed." << std::endl; - debug_stacks_print_to(errorstream); - abort(); } @@ -73,140 +71,9 @@ void fatal_error_fn(const char *msg, const char *file, errorstream << file << ":" << line << ": " << function << ": A fatal error occured: " << msg << std::endl; - debug_stacks_print_to(errorstream); - abort(); } -/* - DebugStack -*/ - -struct DebugStack -{ - DebugStack(std::thread::id id); - void print(FILE *file, bool everything); - void print(std::ostream &os, bool everything); - - std::thread::id thread_id; - char stack[DEBUG_STACK_SIZE][DEBUG_STACK_TEXT_SIZE]; - int stack_i; // Points to the lowest empty position - int stack_max_i; // Highest i that was seen -}; - -DebugStack::DebugStack(std::thread::id id) -{ - thread_id = id; - stack_i = 0; - stack_max_i = 0; - memset(stack, 0, DEBUG_STACK_SIZE*DEBUG_STACK_TEXT_SIZE); -} - -void DebugStack::print(FILE *file, bool everything) -{ - std::ostringstream os; - os << thread_id; - fprintf(file, "DEBUG STACK FOR THREAD %s:\n", - os.str().c_str()); - - for (int i = 0; i < stack_max_i; i++) { - if (i == stack_i && !everything) - break; - - if (i < stack_i) - fprintf(file, "#%d %s\n", i, stack[i]); - else - fprintf(file, "(Leftover data: #%d %s)\n", i, stack[i]); - } - - if (stack_i == DEBUG_STACK_SIZE) - fprintf(file, "Probably overflown.\n"); -} - -void DebugStack::print(std::ostream &os, bool everything) -{ - os<<"DEBUG STACK FOR THREAD "< g_debug_stacks; -std::mutex g_debug_stacks_mutex; - -void debug_stacks_print_to(std::ostream &os) -{ - MutexAutoLock lock(g_debug_stacks_mutex); - - os<<"Debug stacks:"<print(os, false); - } -} - -void debug_stacks_print() -{ - debug_stacks_print_to(errorstream); -} - -DebugStacker::DebugStacker(const char *text) -{ - std::thread::id thread_id = std::this_thread::get_id(); - - MutexAutoLock lock(g_debug_stacks_mutex); - - auto n = g_debug_stacks.find(thread_id); - if (n != g_debug_stacks.end()) { - m_stack = n->second; - } else { - /*DEBUGPRINT("Creating new debug stack for thread %x\n", - (unsigned int)thread_id);*/ - m_stack = new DebugStack(thread_id); - g_debug_stacks[thread_id] = m_stack; - } - - if (m_stack->stack_i >= DEBUG_STACK_SIZE) { - m_overflowed = true; - } else { - m_overflowed = false; - - snprintf(m_stack->stack[m_stack->stack_i], - DEBUG_STACK_TEXT_SIZE, "%s", text); - m_stack->stack_i++; - if (m_stack->stack_i > m_stack->stack_max_i) - m_stack->stack_max_i = m_stack->stack_i; - } -} - -DebugStacker::~DebugStacker() -{ - MutexAutoLock lock(g_debug_stacks_mutex); - - if (m_overflowed) - return; - - m_stack->stack_i--; - - if (m_stack->stack_i == 0) { - std::thread::id thread_id = m_stack->thread_id; - /*DEBUGPRINT("Deleting debug stack for thread %x\n", - (unsigned int)thread_id);*/ - delete m_stack; - g_debug_stacks.erase(thread_id); - } -} - #ifdef _MSC_VER const char *Win32ExceptionCodeToString(DWORD exception_code) diff --git a/src/debug.h b/src/debug.h index da320d83f..1faeece8d 100644 --- a/src/debug.h +++ b/src/debug.h @@ -83,36 +83,6 @@ NORETURN extern void sanity_check_fn( void debug_set_exception_handler(); -/* - DebugStack -*/ - -#define DEBUG_STACK_SIZE 50 -#define DEBUG_STACK_TEXT_SIZE 300 - -extern void debug_stacks_print_to(std::ostream &os); -extern void debug_stacks_print(); - -struct DebugStack; -class DebugStacker -{ -public: - DebugStacker(const char *text); - ~DebugStacker(); - -private: - DebugStack *m_stack; - bool m_overflowed; -}; - -#define DSTACK(msg) \ - DebugStacker __debug_stacker(msg); - -#define DSTACKF(...) \ - char __buf[DEBUG_STACK_TEXT_SIZE]; \ - snprintf(__buf, DEBUG_STACK_TEXT_SIZE, __VA_ARGS__); \ - DebugStacker __debug_stacker(__buf); - /* These should be put into every thread */ diff --git a/src/emerge.cpp b/src/emerge.cpp index d1651da28..f634e9114 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -598,7 +598,6 @@ MapBlock *EmergeThread::finishGen(v3s16 pos, BlockMakeData *bmdata, void *EmergeThread::run() { - DSTACK(FUNCTION_NAME); BEGIN_DEBUG_EXCEPTION_HANDLER v3s16 pos; diff --git a/src/game.cpp b/src/game.cpp index 8a2ca00a2..8141710ff 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1099,8 +1099,6 @@ void KeyCache::populate() key[KeyType::QUICKTUNE_INC] = getKeySetting("keymap_quicktune_inc"); key[KeyType::QUICKTUNE_DEC] = getKeySetting("keymap_quicktune_dec"); - key[KeyType::DEBUG_STACKS] = getKeySetting("keymap_print_debug_stacks"); - for (int i = 0; i < 23; i++) { std::string slot_key_name = "keymap_slot" + std::to_string(i + 1); key[KeyType::SLOT_1 + i] = getKeySetting(slot_key_name.c_str()); @@ -2609,14 +2607,6 @@ void Game::processKeyInput() quicktune->inc(); } else if (wasKeyDown(KeyType::QUICKTUNE_DEC)) { quicktune->dec(); - } else if (wasKeyDown(KeyType::DEBUG_STACKS)) { - // Print debug stacks - dstream << "-----------------------------------------" - << std::endl; - dstream << "Printing debug stacks:" << std::endl; - dstream << "-----------------------------------------" - << std::endl; - debug_stacks_print(); } if (!isKeyDown(KeyType::JUMP) && runData.reset_jump_timer) { diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index da8d20051..53677a57b 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -63,7 +63,6 @@ enum GUI_ID_KEY_MUTE_BUTTON, GUI_ID_KEY_DEC_VOLUME_BUTTON, GUI_ID_KEY_INC_VOLUME_BUTTON, - GUI_ID_KEY_DUMP_BUTTON, GUI_ID_KEY_RANGE_BUTTON, GUI_ID_KEY_ZOOM_BUTTON, GUI_ID_KEY_CAMERA_BUTTON, @@ -433,6 +432,5 @@ void GUIKeyChangeMenu::init_keys() this->add_key(GUI_ID_KEY_HUD_BUTTON, wgettext("Toggle HUD"), "keymap_toggle_hud"); this->add_key(GUI_ID_KEY_CHATLOG_BUTTON, wgettext("Toggle chat log"), "keymap_toggle_chat"); this->add_key(GUI_ID_KEY_FOG_BUTTON, wgettext("Toggle fog"), "keymap_toggle_force_fog_off"); - this->add_key(GUI_ID_KEY_DUMP_BUTTON, wgettext("Print stacks"), "keymap_print_debug_stacks"); } diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 6a9a5e235..140bcbe97 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -642,8 +642,6 @@ protected: void *run() { - DSTACK(FUNCTION_NAME); - CurlHandlePool pool; m_multi = curl_multi_init(); diff --git a/src/inventory.cpp b/src/inventory.cpp index 82325997e..fb2dd245f 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -57,9 +57,7 @@ ItemStack::ItemStack(const std::string &name_, u16 count_, void ItemStack::serialize(std::ostream &os) const { - DSTACK(FUNCTION_NAME); - - if(empty()) + if (empty()) return; // Check how many parts of the itemstring are needed @@ -84,8 +82,6 @@ void ItemStack::serialize(std::ostream &os) const void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef) { - DSTACK(FUNCTION_NAME); - clear(); // Read name diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp index 25f601742..ad567f44c 100644 --- a/src/inventorymanager.cpp +++ b/src/inventorymanager.cpp @@ -842,8 +842,6 @@ bool getCraftingResult(Inventory *inv, ItemStack &result, std::vector &output_replacements, bool decrementInput, IGameDef *gamedef) { - DSTACK(FUNCTION_NAME); - result.clear(); // Get the InventoryList in which we will operate diff --git a/src/main.cpp b/src/main.cpp index 02a85136a..3099c9789 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -151,9 +151,6 @@ int main(int argc, char *argv[]) return 1; } - // Initialize debug stacks - DSTACK(FUNCTION_NAME); - // Debug handler BEGIN_DEBUG_EXCEPTION_HANDLER @@ -779,8 +776,6 @@ static bool determine_subgame(GameParams *game_params) *****************************************************************************/ static bool run_dedicated_server(const GameParams &game_params, const Settings &cmd_args) { - DSTACK("Dedicated server branch"); - verbosestream << _("Using world path") << " [" << game_params.world_path << "]" << std::endl; verbosestream << _("Using gameid") << " [" diff --git a/src/map.cpp b/src/map.cpp index 08e5c3990..b2aa7ac35 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -220,7 +220,6 @@ void Map::setNode(v3s16 p, MapNode & n) <<" while trying to replace \"" <get(block->getNodeNoCheck(relpos, &temp_bool)).name <<"\" at "<setNodeNoCheck(relpos, n); @@ -546,9 +545,6 @@ s32 Map::transforming_liquid_size() { void Map::transformLiquids(std::map &modified_blocks, ServerEnvironment *env) { - DSTACK(FUNCTION_NAME); - //TimeTaker timer("transformLiquids()"); - u32 loopcount = 0; u32 initial_size = m_transforming_liquid.size(); @@ -1432,10 +1428,6 @@ void ServerMap::finishBlockMake(BlockMakeData *data, MapSector *ServerMap::createSector(v2s16 p2d) { - DSTACKF("%s: p2d=(%d,%d)", - FUNCTION_NAME, - p2d.X, p2d.Y); - /* Check if it exists already in memory */ @@ -1479,12 +1471,6 @@ MapBlock * ServerMap::generateBlock( std::map &modified_blocks ) { - DSTACKF("%s: p=(%d,%d,%d)", FUNCTION_NAME, p.X, p.Y, p.Z); - - /*infostream<<"generateBlock(): " - <<"("<getBool("enable_mapgen_debug_info"); TimeTaker timer("generateBlock"); @@ -1588,9 +1574,6 @@ MapBlock * ServerMap::generateBlock( MapBlock * ServerMap::createBlock(v3s16 p) { - DSTACKF("%s: p=(%d,%d,%d)", - FUNCTION_NAME, p.X, p.Y, p.Z); - /* Do not create over max mapgen limit */ @@ -1632,10 +1615,6 @@ MapBlock * ServerMap::createBlock(v3s16 p) MapBlock * ServerMap::emergeBlock(v3s16 p, bool create_blank) { - DSTACKF("%s: p=(%d,%d,%d), create_blank=%d", - FUNCTION_NAME, - p.X, p.Y, p.Z, create_blank); - { MapBlock *block = getBlockNoCreateNoEx(p); if (block && !block->isDummy()) @@ -1825,7 +1804,6 @@ std::string ServerMap::getBlockFilename(v3s16 p) void ServerMap::save(ModifiedState save_level) { - DSTACK(FUNCTION_NAME); if (!m_map_saving_enabled) { warningstream<<"Not saving map, saving disabled."<AsyncRunStep(true); @@ -367,8 +366,6 @@ Server::~Server() void Server::start(Address bind_addr) { - DSTACK(FUNCTION_NAME); - m_bind_addr = bind_addr; infostream<<"Starting server on " @@ -400,8 +397,6 @@ void Server::start(Address bind_addr) void Server::stop() { - DSTACK(FUNCTION_NAME); - infostream<<"Server: Stopping and waiting threads"< 2.0) dtime = 2.0; @@ -437,8 +431,6 @@ void Server::step(float dtime) void Server::AsyncRunStep(bool initial_step) { - DSTACK(FUNCTION_NAME); - g_profiler->add("Server::AsyncRunStep (num)", 1); float dtime; @@ -980,7 +972,6 @@ void Server::AsyncRunStep(bool initial_step) void Server::Receive() { - DSTACK(FUNCTION_NAME); u16 peer_id; try { NetworkPacket pkt; @@ -1093,7 +1084,6 @@ inline void Server::handleCommand(NetworkPacket* pkt) void Server::ProcessData(NetworkPacket *pkt) { - DSTACK(FUNCTION_NAME); // Environment is locked first. MutexAutoLock envlock(m_env_mutex); @@ -1290,7 +1280,6 @@ void Server::SetBlocksNotSent(std::map& block) void Server::peerAdded(con::Peer *peer) { - DSTACK(FUNCTION_NAME); verbosestream<<"Server::peerAdded(): peer->id=" <id<id=" <id<<", timeout="<getPlayer()); /* @@ -1561,8 +1534,6 @@ void Server::SendInventory(PlayerSAO* playerSAO) void Server::SendChatMessage(u16 peer_id, const ChatMessage &message) { - DSTACK(FUNCTION_NAME); - NetworkPacket legacypkt(TOCLIENT_CHAT_MESSAGE_OLD, 0, peer_id); legacypkt << message.message; @@ -1588,8 +1559,6 @@ void Server::SendChatMessage(u16 peer_id, const ChatMessage &message) void Server::SendShowFormspecMessage(u16 peer_id, const std::string &formspec, const std::string &formname) { - DSTACK(FUNCTION_NAME); - NetworkPacket pkt(TOCLIENT_SHOW_FORMSPEC, 0 , peer_id); if (formspec.empty()){ //the client should close the formspec @@ -1610,7 +1579,6 @@ void Server::SendSpawnParticle(u16 peer_id, u16 protocol_version, bool vertical, const std::string &texture, const struct TileAnimationParams &animation, u8 glow) { - DSTACK(FUNCTION_NAME); static thread_local const float radius = g_settings->getS16("max_block_send_distance") * MAP_BLOCKSIZE * BS; @@ -1662,7 +1630,6 @@ void Server::SendAddParticleSpawner(u16 peer_id, u16 protocol_version, u16 attached_id, bool vertical, const std::string &texture, u32 id, const struct TileAnimationParams &animation, u8 glow) { - DSTACK(FUNCTION_NAME); if (peer_id == PEER_ID_INEXISTENT) { // This sucks and should be replaced: std::vector clients = m_clients.getClientIDs(); @@ -1701,8 +1668,6 @@ void Server::SendAddParticleSpawner(u16 peer_id, u16 protocol_version, void Server::SendDeleteParticleSpawner(u16 peer_id, u32 id) { - DSTACK(FUNCTION_NAME); - NetworkPacket pkt(TOCLIENT_DELETE_PARTICLESPAWNER_LEGACY, 2, peer_id); // Ugly error in this packet @@ -1828,8 +1793,6 @@ void Server::SendOverrideDayNightRatio(u16 peer_id, bool do_override, void Server::SendTimeOfDay(u16 peer_id, u16 time, f32 time_speed) { - DSTACK(FUNCTION_NAME); - NetworkPacket pkt(TOCLIENT_TIME_OF_DAY, 0, peer_id); pkt << time << time_speed; @@ -1843,7 +1806,6 @@ void Server::SendTimeOfDay(u16 peer_id, u16 time, f32 time_speed) void Server::SendPlayerHP(u16 peer_id) { - DSTACK(FUNCTION_NAME); PlayerSAO *playersao = getPlayerSAO(peer_id); // In some rare case if the player is disconnected // while Lua call l_punch, for example, this can be NULL @@ -1861,7 +1823,6 @@ void Server::SendPlayerHP(u16 peer_id) void Server::SendPlayerBreath(PlayerSAO *sao) { - DSTACK(FUNCTION_NAME); assert(sao); m_script->player_event(sao, "breath_changed"); @@ -1870,7 +1831,6 @@ void Server::SendPlayerBreath(PlayerSAO *sao) void Server::SendMovePlayer(u16 peer_id) { - DSTACK(FUNCTION_NAME); RemotePlayer *player = m_env->getPlayer(peer_id); assert(player); PlayerSAO *sao = player->getPlayerSAO(); @@ -2194,8 +2154,6 @@ void Server::setBlockNotSent(v3s16 p) void Server::SendBlockNoLock(u16 peer_id, MapBlock *block, u8 ver, u16 net_proto_version) { - DSTACK(FUNCTION_NAME); - v3s16 p = block->getPos(); /* @@ -2216,8 +2174,6 @@ void Server::SendBlockNoLock(u16 peer_id, MapBlock *block, u8 ver, u16 net_proto void Server::SendBlocks(float dtime) { - DSTACK(FUNCTION_NAME); - MutexAutoLock envlock(m_env_mutex); //TODO check if one big lock could be faster then multiple small ones @@ -2282,8 +2238,6 @@ void Server::SendBlocks(float dtime) void Server::fillMediaCache() { - DSTACK(FUNCTION_NAME); - infostream<<"Server: Calculating media file checksums"< &tosend) { - DSTACK(FUNCTION_NAME); - verbosestream<<"Server::sendRequestedMedia(): " <<"Sending files to client"<second; @@ -2571,7 +2519,6 @@ void Server::sendDetachedInventories(u16 peer_id) void Server::DiePlayer(u16 peer_id) { - DSTACK(FUNCTION_NAME); PlayerSAO *playersao = getPlayerSAO(peer_id); // In some rare cases this can be NULL -- if the player is disconnected // when a Lua function modifies l_punch, for example @@ -2593,8 +2540,6 @@ void Server::DiePlayer(u16 peer_id) void Server::RespawnPlayer(u16 peer_id) { - DSTACK(FUNCTION_NAME); - PlayerSAO *playersao = getPlayerSAO(peer_id); assert(playersao); @@ -2617,8 +2562,6 @@ void Server::RespawnPlayer(u16 peer_id) void Server::DenySudoAccess(u16 peer_id) { - DSTACK(FUNCTION_NAME); - NetworkPacket pkt(TOCLIENT_DENY_SUDO_MODE, 0, peer_id); Send(&pkt); } @@ -2643,8 +2586,6 @@ void Server::DenyAccessVerCompliant(u16 peer_id, u16 proto_ver, AccessDeniedCode void Server::DenyAccess(u16 peer_id, AccessDeniedCode reason, const std::string &custom_reason) { - DSTACK(FUNCTION_NAME); - SendAccessDenied(peer_id, reason, custom_reason); m_clients.event(peer_id, CSE_SetDenied); m_con->DisconnectPeer(peer_id); @@ -2654,8 +2595,6 @@ void Server::DenyAccess(u16 peer_id, AccessDeniedCode reason, const std::string // the minimum version for MT users, maybe in 1 year void Server::DenyAccess_Legacy(u16 peer_id, const std::wstring &reason) { - DSTACK(FUNCTION_NAME); - SendAccessDenied_Legacy(peer_id, reason); m_clients.event(peer_id, CSE_SetDenied); m_con->DisconnectPeer(peer_id); @@ -2663,8 +2602,6 @@ void Server::DenyAccess_Legacy(u16 peer_id, const std::wstring &reason) void Server::acceptAuth(u16 peer_id, bool forSudoMode) { - DSTACK(FUNCTION_NAME); - if (!forSudoMode) { RemoteClient* client = getClient(peer_id, CS_Invalid); @@ -2694,7 +2631,6 @@ void Server::acceptAuth(u16 peer_id, bool forSudoMode) void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason) { - DSTACK(FUNCTION_NAME); std::wstring message; { /* @@ -2770,8 +2706,6 @@ void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason) void Server::UpdateCrafting(RemotePlayer *player) { - DSTACK(FUNCTION_NAME); - // Get a preview for crafting ItemStack preview; InventoryLocation loc; @@ -3608,8 +3542,6 @@ void Server::unregisterModStorage(const std::string &name) void dedicated_server_loop(Server &server, bool &kill) { - DSTACK(FUNCTION_NAME); - verbosestream<<"dedicated_server_loop()"<