summaryrefslogtreecommitdiff
path: root/WindowServer/WSMessageLoop.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-01 10:51:58 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-01 10:51:58 +0100
commit6c2089c59d6b77c234a3a14b99a9fd9c5f3ae000 (patch)
treecee191af69bb0642ff0864cbe733dcbb5e1840c0 /WindowServer/WSMessageLoop.cpp
parent1b16a2904493c80af95fa70869c814f7161f5fda (diff)
downloadserenity-6c2089c59d6b77c234a3a14b99a9fd9c5f3ae000.zip
Put miscellaneous debug spam behind #ifdefs.
Diffstat (limited to 'WindowServer/WSMessageLoop.cpp')
-rw-r--r--WindowServer/WSMessageLoop.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/WindowServer/WSMessageLoop.cpp b/WindowServer/WSMessageLoop.cpp
index 2ba401d92e..8e68215381 100644
--- a/WindowServer/WSMessageLoop.cpp
+++ b/WindowServer/WSMessageLoop.cpp
@@ -14,7 +14,7 @@
#include <LibC/stdio.h>
#include <LibC/errno.h>
-//#define WSEVENTLOOP_DEBUG
+//#define WSMESSAGELOOP_DEBUG
static WSMessageLoop* s_the;
@@ -62,7 +62,7 @@ int WSMessageLoop::exec()
for (auto& queued_message : messages) {
auto* receiver = queued_message.receiver.ptr();
auto& message = *queued_message.message;
-#ifdef WSEVENTLOOP_DEBUG
+#ifdef WSMESSAGELOOP_DEBUG
dbgprintf("WSMessageLoop: receiver{%p} message %u\n", receiver, (unsigned)message.type());
#endif
if (receiver)
@@ -73,7 +73,7 @@ int WSMessageLoop::exec()
void WSMessageLoop::post_message(WSMessageReceiver& receiver, OwnPtr<WSMessage>&& message)
{
-#ifdef WSEVENTLOOP_DEBUG
+#ifdef WSMESSAGELOOP_DEBUG
dbgprintf("WSMessageLoop::post_message: {%u} << receiver=%p, message=%p (type=%u)\n", m_queued_messages.size(), receiver, message.ptr(), message->type());
#endif
m_queued_messages.append({ receiver.make_weak_ptr(), move(message) });
@@ -166,7 +166,9 @@ void WSMessageLoop::wait_for_message()
sockaddr_un address;
socklen_t address_size = sizeof(address);
int client_fd = accept(m_server_fd, (sockaddr*)&address, &address_size);
+#ifdef WSMESSAGELOOP_DEBUG
dbgprintf("accept() returned fd=%d, address=%s\n", client_fd, address.sun_path);
+#endif
ASSERT(client_fd >= 0);
new WSClientConnection(client_fd);
}