MXS-2013 Move or remove STR-macros

- The ones that were not used were removed.
- The ones that were used were moved close to the actual type.
  In most cases some values were missing and if the definition is
  close to the type there is a remote chance that they will stay
  in sync. If detached, they surely will not.
This commit is contained in:
Johan Wikman
2018-08-14 15:58:44 +03:00
parent ae43e4f0f2
commit f975035e53
8 changed files with 66 additions and 147 deletions

View File

@ -50,6 +50,17 @@ typedef enum
SESSION_STATE_DUMMY /*< dummy session for consistency */
} mxs_session_state_t;
#define STRSESSIONSTATE(s) ((s) == SESSION_STATE_ALLOC ? "SESSION_STATE_ALLOC" : \
((s) == SESSION_STATE_READY ? "SESSION_STATE_READY" : \
((s) == SESSION_STATE_ROUTER_READY ? "SESSION_STATE_ROUTER_READY" : \
((s) == SESSION_STATE_STOPPING ? "SESSION_STATE_STOPPING": \
((s) == SESSION_STATE_LISTENER ? "SESSION_STATE_LISTENER" : \
((s) == SESSION_STATE_LISTENER_STOPPED ? "SESSION_STATE_LISTENER_STOPPED" : \
((s) == SESSION_STATE_TO_BE_FREED ? "SESSION_STATE_TO_BE_FREED" : \
((s) == SESSION_STATE_FREE ? "SESSION_STATE_TO_BE_FREE" : \
((s) == SESSION_STATE_DUMMY ? "SESSION_STATE_DUMMY" : \
"SESSION_STATE_UNKNOWN")))))))))
typedef enum
{
SESSION_TRX_INACTIVE_BIT = 0x01, /* 0b00001 */