Use new session entry points to get remote and user rather than dereference

the DCB directly.
This commit is contained in:
Mark Riddoch
2014-06-19 16:07:21 +01:00
parent 058d553973
commit c759767a91
5 changed files with 26 additions and 15 deletions

View File

@ -730,4 +730,17 @@ bool session_route_query (
return_succp:
return succp;
}
/**
* Return the username of the user connected to the client side of the
* session.
*
* @param session The session pointer.
* @return The user name or NULL if it can not be determined.
*/
char *
session_getUser(SESSION *session)
{
return (session && session->client) ? session->client->user : NULL;
}