getCapabilities no longer takes arguments and returns an int.
This commit is contained in:
@ -99,7 +99,7 @@ static route_target_t get_shard_route_target (
|
||||
bool trx_active,
|
||||
HINT* hint);
|
||||
|
||||
static uint8_t getCapabilities (ROUTER* inst, void* router_session);
|
||||
static int getCapabilities ();
|
||||
|
||||
static bool connect_backend_servers(
|
||||
backend_ref_t* backend_ref,
|
||||
@ -1241,7 +1241,6 @@ static void* newSession(
|
||||
goto return_rses;
|
||||
}
|
||||
/** Copy backend pointers to router session. */
|
||||
client_rses->rses_capabilities = RCAP_TYPE_STMT_INPUT;
|
||||
client_rses->rses_backend_ref = backend_ref;
|
||||
client_rses->rses_nbackends = router_nservers; /*< # of backend servers */
|
||||
|
||||
@ -3934,27 +3933,11 @@ static void tracelog_routed_query(
|
||||
|
||||
|
||||
/**
|
||||
* Return rc, rc < 0 if router session is closed. rc == 0 if there are no
|
||||
* capabilities specified, rc > 0 when there are capabilities.
|
||||
* Return RCAP_TYPE_STMT_INPUT.
|
||||
*/
|
||||
static uint8_t getCapabilities (
|
||||
ROUTER* inst,
|
||||
void* router_session)
|
||||
static int getCapabilities ()
|
||||
{
|
||||
ROUTER_CLIENT_SES* rses = (ROUTER_CLIENT_SES *)router_session;
|
||||
uint8_t rc;
|
||||
|
||||
if (!rses_begin_locked_router_action(rses))
|
||||
{
|
||||
rc = 0xff;
|
||||
goto return_rc;
|
||||
}
|
||||
rc = rses->rses_capabilities;
|
||||
|
||||
rses_end_locked_router_action(rses);
|
||||
|
||||
return_rc:
|
||||
return rc;
|
||||
return RCAP_TYPE_STMT_INPUT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user