Pass modutil function state as a struct

This allows the type to change without changing it at the call sites.
This commit is contained in:
Markus Mäkelä
2017-08-29 22:46:35 +03:00
parent 2a346fd061
commit e6f78bfcb3
5 changed files with 36 additions and 24 deletions

View File

@ -17,7 +17,7 @@
RWBackend::RWBackend(SERVER_REF* ref):
mxs::Backend(ref),
m_reply_state(REPLY_STATE_DONE),
m_skip(false)
m_modutil_state(MODUTIL_STATE_INIT)
{
}
@ -35,14 +35,14 @@ void RWBackend::set_reply_state(reply_state_t state)
m_reply_state = state;
}
void RWBackend::set_skip_packet(bool state)
void RWBackend::set_modutil_state(const modutil_state& state)
{
m_skip = state;
m_modutil_state = state;
}
bool RWBackend::get_skip_packet() const
modutil_state RWBackend::get_modutil_state() const
{
return m_skip;
return m_modutil_state;
}
bool RWBackend::execute_session_command()