Annotation of 43BSDReno/contrib/isode-beta/rtsap/rt2psabort.c, revision 1.1

1.1     ! root        1: /* rt2psabort.c - RTPM: user abort */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/rtsap/RCS/rt2psabort.c,v 7.2 90/07/27 08:47:43 mrose Exp $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/rtsap/RCS/rt2psabort.c,v 7.2 90/07/27 08:47:43 mrose Exp $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       rt2psabort.c,v $
        !            12:  * Revision 7.2  90/07/27  08:47:43  mrose
        !            13:  * update
        !            14:  * 
        !            15:  * Revision 7.1  90/07/01  21:06:51  mrose
        !            16:  * pepsy
        !            17:  * 
        !            18:  * Revision 6.0  89/03/18  23:43:08  mrose
        !            19:  * Release 5.0
        !            20:  * 
        !            21:  */
        !            22: 
        !            23: /*
        !            24:  *                               NOTICE
        !            25:  *
        !            26:  *    Acquisition, use, and distribution of this module and related
        !            27:  *    materials are subject to the restrictions of a license agreement.
        !            28:  *    Consult the Preface in the User's Manual for the full terms of
        !            29:  *    this agreement.
        !            30:  *
        !            31:  */
        !            32: 
        !            33: 
        !            34: /* LINTLIBRARY */
        !            35: 
        !            36: #include <stdio.h>
        !            37: #include <signal.h>
        !            38: #include "RTS-types.h"
        !            39: #include "rtpkt.h"
        !            40: #include "tailor.h"
        !            41: #include "logger.h"
        !            42: 
        !            43: /*    RT-U-ABORT.REQUEST */
        !            44: 
        !            45: int    RtUAbortRequest (sd, data, rti)
        !            46: int    sd;
        !            47: PE     data;
        !            48: struct RtSAPindication *rti;
        !            49: {
        !            50:     SBV            smask;
        !            51:     int            result;
        !            52:     register struct assocblk *acb;
        !            53: 
        !            54:     missingP (rti);
        !            55: 
        !            56:     smask = sigioblock ();
        !            57: 
        !            58:     rtsapPsig (acb, sd);
        !            59: 
        !            60:     result = RtUAbortRequestAux (acb, data, rti);
        !            61: 
        !            62:     (void) sigiomask (smask);
        !            63: 
        !            64:     return result;
        !            65: }
        !            66: 
        !            67: /*  */
        !            68: 
        !            69: static int  RtUAbortRequestAux (acb, data, rti)
        !            70: register struct assocblk *acb;
        !            71: PE     data;
        !            72: register struct RtSAPindication *rti;
        !            73: {
        !            74:     int            result;
        !            75:     PE     pe,
        !            76:            p;
        !            77:     struct AcSAPindication acis;
        !            78:     register struct AcSAPindication *aci = &acis;
        !            79:     register struct AcSAPabort *aca = &aci -> aci_abort;
        !            80: 
        !            81:     if (!(acb -> acb_flags & ACB_ACS))
        !            82:        return rtsaplose (rti, RTS_OPERATION, NULLCP,
        !            83:                    "not an association descriptor for RTS");
        !            84: /* begin RTAB APDU */
        !            85:     if ((pe = pe_alloc (PE_CLASS_UNIV, PE_FORM_CONS, 22)) == NULLPE
        !            86:            || set_add (pe, num2prim (ABORT_USER, PE_CLASS_CONT, RTAB_REASON))
        !            87:                    == NOTOK
        !            88:            || (data
        !            89:                    && (set_add (pe, p = pe_alloc (PE_CLASS_CONT, PE_FORM_CONS,
        !            90:                                RTAB_USERDATA)) == NOTOK
        !            91:                            || set_add (p, data) == NOTOK))) {
        !            92:        result = rtsaplose (rti, RTS_CONGEST, NULLCP, "out of memory");
        !            93:        (void) AcUAbortRequest (acb -> acb_fd, NULLPEP, 0, aci);
        !            94:        goto out;
        !            95:     }
        !            96:     pe -> pe_context = acb -> acb_rtsid;
        !            97: /* end RTAB APDU */
        !            98: 
        !            99:     PLOGP (rtsap_log,RTS_RTSE__apdus, pe, "RTABapdu", 0);
        !           100: 
        !           101:     if ((result = AcUAbortRequest (acb -> acb_fd, &pe, 1, aci)) == NOTOK)
        !           102:        (void) acs2rtslose (acb, rti, "AcUAbortRequest", aca);
        !           103:     else
        !           104:        result = OK;
        !           105: 
        !           106: out: ;
        !           107:     if (pe) {
        !           108:        if (data)
        !           109:            (void) pe_extract (pe, data);
        !           110:        pe_free (pe);
        !           111:     }
        !           112: 
        !           113:     return result;
        !           114: }

unix.superglobalmegacorp.com

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