MXS-2068: Split reply_is_complete into two functions

By splitting the processing and state querying into two separate
functions, the result can be inspected multiple times without triggering
the result processing.
This commit is contained in:
Markus Mäkelä
2018-09-25 12:49:02 +03:00
parent 60cb8127a0
commit 24b438c9b6
4 changed files with 21 additions and 15 deletions

View File

@ -104,7 +104,17 @@ public:
return m_local_infile_requested;
}
bool reply_is_complete(GWBUF* buffer);
void process_reply(GWBUF* buffer);
/**
* Check whether the response from the server is complete
*
* @return True if no more results are expected from this server
*/
bool reply_is_complete() const
{
return m_reply_state == REPLY_STATE_DONE;
}
// Controlled by the session
ResponseStat& response_stat();