Annotation of 43BSDReno/contrib/isode-beta/rosy/rydserror.c, revision 1.1

1.1     ! root        1: /* rydserror.c - ROSY: return error to invocation */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/rosy/RCS/rydserror.c,v 7.1 90/07/01 21:06:31 mrose Exp $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/rosy/RCS/rydserror.c,v 7.1 90/07/01 21:06:31 mrose Exp $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       rydserror.c,v $
        !            12:  * Revision 7.1  90/07/01  21:06:31  mrose
        !            13:  * pepsy
        !            14:  * 
        !            15:  * Revision 7.0  89/11/23  22:21:56  mrose
        !            16:  * Release 6.0
        !            17:  * 
        !            18:  */
        !            19: 
        !            20: /*
        !            21:  *                               NOTICE
        !            22:  *
        !            23:  *    Acquisition, use, and distribution of this module and related
        !            24:  *    materials are subject to the restrictions of a license agreement.
        !            25:  *    Consult the Preface in the User's Manual for the full terms of
        !            26:  *    this agreement.
        !            27:  *
        !            28:  */
        !            29: 
        !            30: 
        !            31: /* LINTLIBRARY */
        !            32: 
        !            33: #include <stdio.h>
        !            34: #include "rosy.h"
        !            35: 
        !            36: 
        !            37: #define        missingP(p) \
        !            38: { \
        !            39:     if (p == NULL) \
        !            40:        return rosaplose (roi, ROS_PARAMETER, NULLCP, \
        !            41:                            "mandatory parameter \"%s\" missing", "p"); \
        !            42: }
        !            43: 
        !            44: /*    ERROR */
        !            45: 
        !            46: int    RyDsError (sd, id, err, out, priority, roi)
        !            47: int    sd;
        !            48: int    id,
        !            49:        err,
        !            50:        priority;
        !            51: caddr_t        out;
        !            52: struct RoSAPindication *roi;
        !            53: {
        !            54:     int            result;
        !            55:     PE     pe;
        !            56:     register struct opsblk *opb;
        !            57:     register struct RyError **ryep,
        !            58:                            *rye;
        !            59:     register struct RyOperation *ryo;
        !            60: 
        !            61:     missingP (roi);
        !            62: 
        !            63:     if ((opb = findopblk (sd, id, OPB_RESPONDER)) == NULLOPB)
        !            64:        return rosaplose (roi, ROS_PARAMETER, NULLCP,
        !            65:                "invocation %d not in progress on association %d",
        !            66:                id, sd);
        !            67: 
        !            68:     ryo = opb -> opb_ryo;
        !            69:     if (!(ryep = ryo -> ryo_errors))
        !            70:        return rosaplose (roi, ROS_PARAMETER, NULLCP,
        !            71:                "error not permitted with operation %s/%d",
        !            72:                ryo -> ryo_name, ryo -> ryo_op);
        !            73: 
        !            74:     for (; *ryep; ryep++)
        !            75:        if ((*ryep) -> rye_err == err)
        !            76:            break;
        !            77: 
        !            78:     if (!(rye = *ryep))
        !            79:        return rosaplose (roi, ROS_PARAMETER, NULLCP,
        !            80:                "error %d not permitted with operation %s/%d",
        !            81:                err, ryo -> ryo_name, ryo -> ryo_op);
        !            82: 
        !            83: #ifdef PEPSY_DEFINITIONS
        !            84:     if (rye -> rye_param_mod) {
        !            85: #else 
        !            86:     if (rye -> rye_param_encode) {
        !            87: #endif 
        !            88: #ifdef notdef
        !            89:        missingP (out);
        !            90: #endif
        !            91:        PY_pepy[0] = 0;
        !            92: #ifdef PEPSY_DEFINITIONS
        !            93:        if (enc_f (rye -> rye_param_index, rye -> rye_param_mod, &pe, 1, NULL,
        !            94:                   NULLCP, out) == NOTOK)
        !            95: #else 
        !            96:        if ((*rye -> rye_param_encode) (&pe, 1, NULL, NULLCP, out) == NOTOK)
        !            97: #endif 
        !            98:            return rosaplose (roi, ROS_CONGEST, NULLCP,
        !            99:            "error encoding parameter for invocation %d having %s/%d [%s]",
        !           100:                              opb -> opb_id, rye -> rye_name, rye -> rye_err,
        !           101:                              PY_pepy);
        !           102:     }
        !           103:     else {
        !           104:        if (out)
        !           105:            return rosaplose (roi, ROS_PARAMETER, NULLCP,
        !           106:                    "error parameter not permitted with operation %s/%d",
        !           107:                    rye -> rye_name, rye -> rye_err);
        !           108: 
        !           109:        pe = NULLPE;
        !           110:     }
        !           111: 
        !           112:     if ((result = RoErrorRequest (sd, id, err, pe, priority, roi)) != NOTOK)
        !           113:        freeopblk (opb);
        !           114: 
        !           115:     if (pe)
        !           116:        pe_free (pe);
        !           117: 
        !           118:     return result;
        !           119: 
        !           120: }

unix.superglobalmegacorp.com

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