Annotation of 43BSDReno/contrib/isode-beta/dsap/net/dapunbind.c, revision 1.1

1.1     ! root        1: /* dapunbind.c - DAP unbind operation */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/dsap/net/RCS/dapunbind.c,v 7.0 90/07/26 14:45:30 mrose Exp $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/dsap/net/RCS/dapunbind.c,v 7.0 90/07/26 14:45:30 mrose Exp $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       dapunbind.c,v $
        !            12:  * Revision 7.0  90/07/26  14:45:30  mrose
        !            13:  * *** empty log message ***
        !            14:  * 
        !            15:  */
        !            16: 
        !            17: /*
        !            18:  *                               NOTICE
        !            19:  *
        !            20:  *    Acquisition, use, and distribution of this module and related
        !            21:  *    materials are subject to the restrictions of a license agreement.
        !            22:  *    Consult the Preface in the User's Manual for the full terms of
        !            23:  *    this agreement.
        !            24:  *
        !            25:  */
        !            26: 
        !            27: 
        !            28: /* LINTLIBRARY */
        !            29: 
        !            30: #include "logger.h"
        !            31: #include "quipu/util.h"
        !            32: #include "quipu/dap.h"
        !            33: #include "quipu/dap2.h"
        !            34: 
        !            35: extern LLog    * log_dsap;
        !            36: 
        !            37: /*
        !            38: * Seems that this should be a #define
        !            39: */
        !            40: 
        !            41: ds_unbind ()
        !            42: {
        !            43:     return(dap_unbind(dsap_ad));
        !            44: }
        !            45: 
        !            46: dap_unbind (ad)
        !            47: int      ad;
        !            48: {
        !            49:     int                                  ret;
        !            50:     struct DAPrelease         dr_s;
        !            51:     struct DAPrelease         *dr = &dr_s;
        !            52:     struct DAPindication      di_s;
        !            53:     struct DAPindication      *di = &di_s;
        !            54: 
        !            55:     DLOG(log_dsap, LLOG_NOTICE, ("dap_unbind: <%d, normal, nullpe>",
        !            56:                                        ad));
        !            57: 
        !            58:     ret = DapUnBindRequest (ad, NOTOK, dr, di);
        !            59: 
        !            60:     if (ret != OK)
        !            61:     {
        !            62:        LLOG (log_dsap, LLOG_EXCEPTIONS, ("DapUnBindRequest() failed"));
        !            63:        return (DS_ERROR_LOCAL);
        !            64:     }
        !            65: 
        !            66:     if (!dr->dr_affirmative) {
        !            67:        LLOG(log_dsap, LLOG_EXCEPTIONS, ("DapUnBindRequest failed"));
        !            68:        return(DS_ERROR_PROVIDER);
        !            69:     }
        !            70: 
        !            71:     return(DS_OK);
        !            72: }
        !            73: 
        !            74: /* ARGSUSED */
        !            75: 
        !            76: int      DapUnBindRequest (sd, secs, dr, di)
        !            77: int                      sd;
        !            78: int                      secs;
        !            79: struct DAPrelease      * dr;
        !            80: struct DAPindication   * di;
        !            81: {
        !            82:        int                       result;
        !            83:        struct AcSAPrelease       acr_s;
        !            84:        struct AcSAPrelease     * acr = &(acr_s);
        !            85:        struct RoNOTindication    rni_s;
        !            86:        struct RoNOTindication  * rni = &(rni_s);
        !            87: 
        !            88: 
        !            89:        result = RoUnBindRequest (sd, NULLPE, secs, acr, rni);
        !            90: 
        !            91:        if (result == OK)
        !            92:        {
        !            93:                dr->dr_affirmative = acr->acr_affirmative;
        !            94:                dr->dr_reason = acr->acr_reason;
        !            95:                ACRFREE(acr);
        !            96:                return (OK);
        !            97:        }
        !            98: 
        !            99:        if (result == NOTOK)
        !           100:        {
        !           101:                return (ronot2daplose (di, "D-UNBIND.REQUEST", rni));
        !           102:        }
        !           103: 
        !           104:        return (result);
        !           105: }
        !           106: 
        !           107: /*    D-UNBIND.RETRY */
        !           108: 
        !           109: /* ARGSUSED */
        !           110: 
        !           111: int      DapUnBindRetry (sd, secs, dr, di)
        !           112: int                      sd;
        !           113: int                      secs;
        !           114: struct DAPrelease      * dr;
        !           115: struct DAPindication   * di;
        !           116: {
        !           117:        int                       result;
        !           118:        struct AcSAPrelease       acr_s;
        !           119:        struct AcSAPrelease     * acr = &(acr_s);
        !           120:        struct RoNOTindication    rni_s;
        !           121:        struct RoNOTindication  * rni = &(rni_s);
        !           122: 
        !           123:        result = RoUnBindRetry (sd, secs, acr, rni);
        !           124: 
        !           125:        if (result == OK)
        !           126:        {
        !           127:                dr->dr_affirmative = acr->acr_affirmative;
        !           128:                dr->dr_reason = acr->acr_reason;
        !           129:                ACRFREE (acr);
        !           130:                return (OK);
        !           131:        }
        !           132: 
        !           133:        if (result == NOTOK)
        !           134:        {
        !           135:                return (ronot2daplose (di, "D-UNBIND.RETRY", rni));
        !           136:        }
        !           137: 
        !           138:        return (result);
        !           139: }
        !           140: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.