ctdbIsSessionExclusive
Retrieves the status of the session exclusive flag.
DECLARATION
CTBOOL ctdbIsSessionExclusive(CTHANDLE Handle);
DESCRIPTION
ctdbIsSessionExclusive() retrieves the status of the session exclusive flag.
RETURN
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO |
Batch operation not under way. |
1 |
YES |
Batch operation under way. |
See Appendix A for a complete listing of valid c-tree Plus error values.
EXAMPLE
/* verify an exclusive logon */
CTHANDLE hSession = ctdbAllocSession(CTSESSION_CTDB);
if (hSession)
{
ctdbSetSessionExclusive(hSession, YES);
if (ctdbLogon(hSession, "FAIRCOM", "ADMIN", "ADMIN") != CTDBRET_OK)
printf("ctdbLogon failed\n");
}
if (ctdbIsSessionExclusive(hSession))
printf("Session is exclusive\n");
else
printf("Session is shared\n");
ctdbFreeSession(hSession);
SEE ALSO
ctdbSetSessionExclusive(), ctdbSetDatabaseExclusive(), ctdbIsDatabaseExclusive()