1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +00:00

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
This commit is contained in:
asynts 2021-01-11 21:13:30 +01:00 committed by Andreas Kling
parent 4953c73fc1
commit 01879d27c2
12 changed files with 33 additions and 23 deletions

View file

@ -54,13 +54,13 @@ public:
void did_misbehave()
{
dbg() << *this << " (id=" << m_client_id << ", pid=" << client_pid() << ") misbehaved, disconnecting.";
dbgln("{} (id={}, pid={}) misbehaved, disconnecting.", *this, m_client_id, client_pid());
this->shutdown();
}
void did_misbehave(const char* message)
{
dbg() << *this << " (id=" << m_client_id << ", pid=" << client_pid() << ") misbehaved (" << message << "), disconnecting.";
dbgln("{} (id={}, pid={}) misbehaved ({}), disconnecting.", *this, m_client_id, client_pid(), message);
this->shutdown();
}
@ -76,3 +76,8 @@ private:
};
}
template<>
template<typename ClientEndpoint, typename ServerEndpoint>
struct AK::Formatter<IPC::ClientConnection<ClientEndpoint, ServerEndpoint>> : Formatter<Core::Object> {
};

View file

@ -99,11 +99,11 @@ public:
if (nwritten < 0) {
switch (errno) {
case EPIPE:
dbg() << *this << "::post_message: Disconnected from peer";
dbgln("{}::post_message: Disconnected from peer", *this);
shutdown();
return;
case EAGAIN:
dbg() << *this << "::post_message: Peer buffer overflowed";
dbgln("{}::post_message: Peer buffer overflowed", *this);
shutdown();
return;
default:
@ -231,7 +231,7 @@ protected:
// in the next run of this function.
auto remaining_bytes = ByteBuffer::copy(bytes.data() + index, bytes.size() - index);
if (!m_unprocessed_bytes.is_empty()) {
dbg() << *this << "::drain_messages_from_peer: Already have unprocessed bytes";
dbgln("{}::drain_messages_from_peer: Already have unprocessed bytes", *this);
shutdown();
return false;
}
@ -279,3 +279,8 @@ protected:
};
}
template<>
template<typename LocalEndpoint, typename PeerEndpoint>
struct AK::Formatter<IPC::Connection<LocalEndpoint, PeerEndpoint>> : Formatter<Core::Object> {
};