Change capabilities to uint64_t

- Since the capabilities are a bitmask, it is better if an unsigned
  integral type is used.
- Since the function is part of an ABI, it is better if an explicit
  size is used.
- 64-bits so that there also is room for independent filter
  capabilities.
This commit is contained in:
Johan Wikman
2016-10-20 17:47:00 +03:00
parent d938f0e72f
commit 6bcb3ce4dc
13 changed files with 32 additions and 35 deletions

View File

@ -59,7 +59,6 @@ typedef struct router_client_session
DCB *backend_dcb; /*< DCB Connection to the backend */
DCB *client_dcb; /**< Client DCB */
struct router_client_session *next;
int rses_capabilities; /*< input type, for example */
#if defined(SS_DEBUG)
skygw_chk_t rses_chk_tail;
#endif

View File

@ -111,7 +111,7 @@ static void clientReply(ROUTER *instance, void *router_session, GWBUF *queue,
DCB *backend_dcb);
static void handleError(ROUTER *instance, void *router_session, GWBUF *errbuf,
DCB *problem_dcb, error_action_t action, bool *succp);
static int getCapabilities();
static uint64_t getCapabilities();
/** The module object definition */
@ -561,8 +561,6 @@ newSession(ROUTER *instance, SESSION *session)
}
}
client_rses->rses_capabilities = RCAP_TYPE_PACKET_INPUT;
/*
* We now have the server with the least connections.
* Bump the connection count for this server
@ -987,7 +985,7 @@ static void rses_end_locked_router_action(ROUTER_CLIENT_SES* rses)
spinlock_release(&rses->rses_lock);
}
static int getCapabilities()
static uint64_t getCapabilities()
{
return RCAP_TYPE_PACKET_INPUT;
}