Disconnect handler

The following is an example of a disconnect handler:

CS_RETCODE CS_PUBLIC
fullpass_disconnect(srvproc)
SRV_PROC        *srvproc;
{
    CS_INT      spid;
    CS_CHAR     msg[CS_MAX_MSG];
    /* Initialization                           */
    spid = 0;
    /* Get the spid    */
    if (srv_thread_props(srvproc, CS_GET, SRV_T_SPID, 
        (CS_VOID *)&spid,
        CS_SIZEOF(spid), NIL(CS_INT *)) != CS_SUCCEED)
    {
        return (CS_FAIL);
    }
    sprintf(msg,"SPID %d disconnected.\n", spid);
    SRV_LOG(CS_TRUE, msg, CS_NULLTERM);
    return CS_SUCCEED;
}