StopUserAsync
Short Name
STPUSRA()
Type
Server-only function
Declaration
COUNT StopUserAsync(COUNT mode)
Description
StopUserAsync() is the same as StopUser() except that it returns immediately when called by a client without waiting for the server to complete the STPUSR() processing.
StopUserAsync() accepts a mode parameter to convey special user shutdown options. The only mode implemented affects flush operations: if a file is on the NO_SHUTDOWN_FLUSH list (see the NO_SHUTDOWN_FLUSH FairCom Server configuration keyword), and if StopUserAsync() is called with ctNOFLUSH OR-ed into mode, the file buffers will not be flushed if the StopUserAsync() causes the file closure, and the file will be marked corrupt.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
Successful disconnect. |
133 |
ASKY_ERR |
User cannot be found (has it been shut down?). |
162 |
SGON_ERR |
Server communication link has been disturbed. |
410 |
USTP_ERR |
User is not logged on when StopUserAsync() was called. |
See c-tree Error Codes for a complete listing of valid c-tree error values.
Example
COUNT retval=0, buf = dbuf = 10, fil = sect = 32;
pTEXT uid = "ADMIN", pass = "ADMIN", srv = "FAIRCOMS";
if (retval = InitISAMXtd(buf, fil, sect, dbuf, NULL, uid, pass, srv))
{
printf("\nCould not initialize c-tree: %hd", retval);
StopUserAsync(ctNOFLUSH);
exit(2);
}
See also
StopUser()