Cut down content transfer verbosity

This commit is contained in:
Perttu Ahola 2011-11-16 00:20:22 +02:00
parent 594b189569
commit 26abf6fd82
2 changed files with 10 additions and 14 deletions

@ -1517,9 +1517,6 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
} }
else if(command == TOCLIENT_TEXTURES) else if(command == TOCLIENT_TEXTURES)
{ {
infostream<<"Client: Received textures: packet size: "<<datasize
<<std::endl;
io::IFileSystem *irrfs = m_device->getFileSystem(); io::IFileSystem *irrfs = m_device->getFileSystem();
video::IVideoDriver *vdrv = m_device->getVideoDriver(); video::IVideoDriver *vdrv = m_device->getVideoDriver();
@ -1547,8 +1544,9 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
if(bunch_i == num_bunches - 1) if(bunch_i == num_bunches - 1)
m_textures_received = true; m_textures_received = true;
int num_textures = readU32(is); int num_textures = readU32(is);
infostream<<"Client: Received textures: count: "<<num_textures infostream<<"Client: Received textures: bunch "<<bunch_i<<"/"
<<std::endl; <<num_bunches<<" textures="<<num_textures
<<" size="<<datasize<<std::endl;
for(int i=0; i<num_textures; i++){ for(int i=0; i<num_textures; i++){
std::string name = deSerializeString(is); std::string name = deSerializeString(is);
std::string data = deSerializeLongString(is); std::string data = deSerializeLongString(is);

@ -3640,7 +3640,6 @@ void Server::SendToolDef(con::Connection &con, u16 peer_id,
IToolDefManager *tooldef) IToolDefManager *tooldef)
{ {
DSTACK(__FUNCTION_NAME); DSTACK(__FUNCTION_NAME);
infostream<<"Server: Sending tool definitions"<<std::endl;
std::ostringstream os(std::ios_base::binary); std::ostringstream os(std::ios_base::binary);
/* /*
@ -3655,7 +3654,7 @@ void Server::SendToolDef(con::Connection &con, u16 peer_id,
// Make data buffer // Make data buffer
std::string s = os.str(); std::string s = os.str();
infostream<<"Server: Sending tool definitions: data size: " infostream<<"Server::SendToolDef(): Sending tool definitions: size="
<<s.size()<<std::endl; <<s.size()<<std::endl;
SharedBuffer<u8> data((u8*)s.c_str(), s.size()); SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable // Send as reliable
@ -3666,7 +3665,6 @@ void Server::SendNodeDef(con::Connection &con, u16 peer_id,
INodeDefManager *nodedef) INodeDefManager *nodedef)
{ {
DSTACK(__FUNCTION_NAME); DSTACK(__FUNCTION_NAME);
infostream<<"Server: Sending node definitions"<<std::endl;
std::ostringstream os(std::ios_base::binary); std::ostringstream os(std::ios_base::binary);
/* /*
@ -3681,7 +3679,7 @@ void Server::SendNodeDef(con::Connection &con, u16 peer_id,
// Make data buffer // Make data buffer
std::string s = os.str(); std::string s = os.str();
infostream<<"Server: Sending node definitions: data size: " infostream<<"Server::SendNodeDef(): Sending node definitions: size="
<<s.size()<<std::endl; <<s.size()<<std::endl;
SharedBuffer<u8> data((u8*)s.c_str(), s.size()); SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable // Send as reliable
@ -4205,8 +4203,8 @@ void Server::SendTextures(u16 peer_id)
<<tname<<"\""<<std::endl; <<tname<<"\""<<std::endl;
continue; continue;
} }
errorstream<<"Server::SendTextures(): Loaded \"" /*infostream<<"Server::SendTextures(): Loaded \""
<<tname<<"\""<<std::endl; <<tname<<"\""<<std::endl;*/
// Put in list // Put in list
texture_bunches[texture_bunches.size()-1].push_back( texture_bunches[texture_bunches.size()-1].push_back(
SendableTexture(tname, tpath, tmp_os.str())); SendableTexture(tname, tpath, tmp_os.str()));
@ -4252,9 +4250,9 @@ void Server::SendTextures(u16 peer_id)
// Make data buffer // Make data buffer
std::string s = os.str(); std::string s = os.str();
infostream<<"Server::SendTextures(): number of textures in bunch[" infostream<<"Server::SendTextures(): bunch "<<i<<"/"<<num_bunches
<<i<<"]: "<<texture_bunches[i].size() <<" textures="<<texture_bunches[i].size()
<<", size: "<<s.size()<<std::endl; <<" size=" <<s.size()<<std::endl;
SharedBuffer<u8> data((u8*)s.c_str(), s.size()); SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable // Send as reliable
m_con.Send(peer_id, 0, data, true); m_con.Send(peer_id, 0, data, true);