MXS-1502: Add have_session_commands helper function

The function conveys the meaning of the call better than using
session_command_count to check whether there are session commands to be
executed.
This commit is contained in:
Markus Mäkelä
2018-03-30 08:40:01 +03:00
parent 7d4f37d25b
commit 319122e621
6 changed files with 21 additions and 11 deletions

View File

@ -69,7 +69,7 @@ static void discard_if_response_differs(SRWBackend backend, uint8_t master_cmd,
void process_sescmd_response(RWSplitSession* rses, SRWBackend& backend, GWBUF** ppPacket)
{
if (backend->session_command_count())
if (backend->have_session_commands())
{
/** We are executing a session command */
if (GWBUF_IS_TYPE_SESCMD_RESPONSE((*ppPacket)))