Fixed many error handling issues regading to timing and multiple threads.

Added flags to those backend references which have sent something to backend which causes the backend to send results or reply back. Didn't add removal of the flag since there's currently no way to tell whether response from backend contains anything else than session command reply - which aren't counted when BREF_WAITING_RESULT is set and cleared.
This commit is contained in:
VilhoRaatikka
2014-06-12 23:22:51 +03:00
parent e95b6cc0d9
commit 15ff1fd26a
8 changed files with 439 additions and 149 deletions

View File

@ -642,3 +642,30 @@ int i;
return 1;
}
bool session_route_query (
SESSION* ses,
GWBUF* buf)
{
bool succp;
if (ses->head.routeQuery == NULL ||
ses->head.instance == NULL ||
ses->head.session == NULL)
{
succp = false;
goto return_succp;
}
if (ses->head.routeQuery(ses->head.instance, ses->head.session, buf) == 1)
{
succp = true;
}
else
{
succp = false;
}
return_succp:
return succp;
}