getCapabilities no longer takes arguments and returns an int.

This commit is contained in:
Markus Makela
2015-11-11 17:41:48 +02:00
parent 49d4a2019e
commit 30d1fc66b7
15 changed files with 30 additions and 96 deletions

View File

@ -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;
}
/**