From a00f9b500329d95d9b63fe7f2c0227175ce91f26 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Fri, 20 Apr 2018 18:57:05 +0100 Subject: [PATCH] net: Pass a pointer rather than a reference in DMLSession::on_message --- include/ki/protocol/net/DMLSession.h | 2 +- src/protocol/net/DMLSession.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ki/protocol/net/DMLSession.h b/include/ki/protocol/net/DMLSession.h index 345b563..29bebbe 100644 --- a/include/ki/protocol/net/DMLSession.h +++ b/include/ki/protocol/net/DMLSession.h @@ -29,7 +29,7 @@ namespace net void send_message(const dml::Message &message); protected: void on_application_message(const PacketHeader& header) override; - virtual void on_message(const dml::Message &message) {} + virtual void on_message(const dml::Message *message) {} virtual void on_invalid_message(InvalidDMLMessageErrorCode error) {} private: const dml::MessageManager &m_manager; diff --git a/src/protocol/net/DMLSession.cpp b/src/protocol/net/DMLSession.cpp index aec5c48..22394f2 100644 --- a/src/protocol/net/DMLSession.cpp +++ b/src/protocol/net/DMLSession.cpp @@ -31,7 +31,7 @@ namespace net // Are we sufficiently authenticated to handle this message? if (get_access_level() >= message->get_access_level()) - on_message(*message); + on_message(message); else on_invalid_message(InvalidDMLMessageErrorCode::INSUFFICIENT_ACCESS); delete message;