Move transaction state management to the right place

The transaction state must be updated after a buffer has been split
into buffer containing individual packets.

NOTE: The actual updating of the transaction state and the autocommit
      mode is currently wrong, but will be updated in a subsequent change.
This commit is contained in:
Johan Wikman
2016-10-25 10:58:49 +03:00
parent 7e822aed4d
commit 041df39819
2 changed files with 82 additions and 42 deletions

View File

@ -40,5 +40,18 @@ typedef enum routing_capability
#define RCAP_TYPE_NONE 0
/**
* Determines whether a particular capability type is required.
*
* @param capabilites The capability bits to be tested.
* @param type A particular capability type or a bitmask of types.
*
* @return True, if @c type is present in @c capabilities.
*/
static inline bool rcap_type_required(uint64_t capabilities, uint64_t type)
{
return (capabilities & type) == type;
}
MXS_END_DECLS