mirror of https://github.com/SeanOMik/libki.git
net: Pass a pointer rather than a reference in DMLSession::on_message
This commit is contained in:
parent
993191ec51
commit
a00f9b5003
|
@ -29,7 +29,7 @@ namespace net
|
||||||
void send_message(const dml::Message &message);
|
void send_message(const dml::Message &message);
|
||||||
protected:
|
protected:
|
||||||
void on_application_message(const PacketHeader& header) override;
|
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) {}
|
virtual void on_invalid_message(InvalidDMLMessageErrorCode error) {}
|
||||||
private:
|
private:
|
||||||
const dml::MessageManager &m_manager;
|
const dml::MessageManager &m_manager;
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace net
|
||||||
|
|
||||||
// Are we sufficiently authenticated to handle this message?
|
// Are we sufficiently authenticated to handle this message?
|
||||||
if (get_access_level() >= message->get_access_level())
|
if (get_access_level() >= message->get_access_level())
|
||||||
on_message(*message);
|
on_message(message);
|
||||||
else
|
else
|
||||||
on_invalid_message(InvalidDMLMessageErrorCode::INSUFFICIENT_ACCESS);
|
on_invalid_message(InvalidDMLMessageErrorCode::INSUFFICIENT_ACCESS);
|
||||||
delete message;
|
delete message;
|
||||||
|
|
Loading…
Reference in New Issue