ctdbIsActiveSession
Check if a session is active. A session is active when the session handle has been allocated and the session is logged in to the server.
Declaration
CTBOOL ctdbIsActiveSession(CTHANDLE Handle)
Description
ctdbIsActiveSession() checks to see if a session is active. A session is defined as active when the session handle has been allocated by ctdbAllocSession() and the session is logged in to the server with ctdbLogon().
Returns
ctdbIsActiveSession() returns YES if the session is active and NO otherwise.
Example
act=ctdbIsActiveSession(hSession);
if (act)
printf("\n\nThe server is active.\n");
else
{
printf("\n\nThe Session is not active. Logon first.\n");
ctdbLogon(hSession, "FAIRCOMS", "ADMIN", "ADMIN");
}
See also
ctdbLogon(), ctdbAllocSession(), ctdbIsActiveDatabase(), ctdbIsActiveTable()