aboutsummaryrefslogtreecommitdiff
path: root/src/packet_distribution.cpp
diff options
context:
space:
mode:
authoroldmud0 <3421260-oldmud0@users.noreply.gitlab.com>2019-07-12 23:00:25 +0000
committeroldmud0 <3421260-oldmud0@users.noreply.gitlab.com>2019-07-12 23:00:25 +0000
commit2a5d569511af7d9411cd73f2dfd329da38730dc0 (patch)
tree7eb561cd17039bb29e2f50dd5699c634051d72b2 /src/packet_distribution.cpp
parent621aa1adacec2bcc6befb1a4a70eff7c0e46e7b6 (diff)
parent5eccabcad15a52691228aded1d9c1fd5074fb70e (diff)
Merge branch 'less_insane_debugging' into 'master'
Less insane debugging See merge request AttorneyOnline/AO2-Client!75
Diffstat (limited to 'src/packet_distribution.cpp')
-rw-r--r--src/packet_distribution.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index 68d2fb9b..942c275d 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -14,8 +14,10 @@ void AOApplication::ms_packet_received(AOPacket *p_packet)
QString header = p_packet->get_header();
QStringList f_contents = p_packet->get_contents();
+#ifdef DEBUG_NETWORK
if (header != "CHECK")
qDebug() << "R(ms):" << p_packet->to_string();
+#endif
if (header == "ALL")
{
@@ -127,8 +129,10 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
QStringList f_contents = p_packet->get_contents();
QString f_packet = p_packet->to_string();
+#ifdef DEBUG_NETWORK
if (header != "checkconnection")
qDebug() << "R:" << f_packet;
+#endif
if (header == "decryptor")
{
@@ -677,7 +681,9 @@ void AOApplication::send_ms_packet(AOPacket *p_packet)
net_manager->ship_ms_packet(f_packet);
+#ifdef DEBUG_NETWORK
qDebug() << "S(ms):" << f_packet;
+#endif
delete p_packet;
}
@@ -691,14 +697,18 @@ void AOApplication::send_server_packet(AOPacket *p_packet, bool encoded)
if (encryption_needed)
{
+#ifdef DEBUG_NETWORK
qDebug() << "S(e):" << f_packet;
+#endif
p_packet->encrypt_header(s_decryptor);
f_packet = p_packet->to_string();
}
else
{
+#ifdef DEBUG_NETWORK
qDebug() << "S:" << f_packet;
+#endif
}
net_manager->ship_server_packet(f_packet);