Annotation of 43BSDReno/contrib/isode-beta/psap2/psaprelease2.c, revision 1.1

1.1     ! root        1: /* psaprelease2.c - PPM: respond to release */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/psap2/RCS/psaprelease2.c,v 7.0 89/11/23 22:14:26 mrose Rel $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/psap2/RCS/psaprelease2.c,v 7.0 89/11/23 22:14:26 mrose Rel $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       psaprelease2.c,v $
        !            12:  * Revision 7.0  89/11/23  22:14:26  mrose
        !            13:  * Release 6.0
        !            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 <stdio.h>
        !            31: #include <signal.h>
        !            32: #include "ppkt.h"
        !            33: 
        !            34: /*    P-RELEASE.RESPONSE */
        !            35: 
        !            36: int    PRelResponse (sd, status, data, ndata, pi)
        !            37: int    sd;
        !            38: int    status;
        !            39: PE     *data;
        !            40: int    ndata;
        !            41: struct PSAPindication *pi;
        !            42: {
        !            43:     SBV            smask;
        !            44:     int            len,
        !            45:            result;
        !            46:     char   *base,
        !            47:           *realbase;
        !            48:     register struct psapblk *pb;
        !            49:     struct SSAPindication   sis;
        !            50:     register struct SSAPabort  *sa = &sis.si_abort;
        !            51: 
        !            52:     toomuchP (data, ndata, NPDATA, "release");
        !            53:     missingP (pi);
        !            54: 
        !            55:     smask = sigioblock ();
        !            56: 
        !            57:     psapFsig (pb, sd);
        !            58: 
        !            59:     switch (result = info2ssdu (pb, pi, data, ndata, &realbase, &base, &len,
        !            60:                                "P-RELEASE user-data", PPDU_NONE)) {
        !            61:         case NOTOK:
        !            62:            goto out2;
        !            63: 
        !            64:        case OK:
        !            65:        default:
        !            66:            break;
        !            67: 
        !            68:        case DONE:
        !            69:            result = NOTOK;
        !            70:            goto out1;
        !            71:     }
        !            72: 
        !            73:     if ((result = SRelResponse (pb -> pb_fd, status, base, len, &sis))
        !            74:            == NOTOK)
        !            75:        if (SC_FATAL (sa -> sa_reason)) {
        !            76:            (void) ss2pslose (pb, pi, "SRelResponse", sa);
        !            77:            goto out2;
        !            78:        }
        !            79:        else {
        !            80:            (void) ss2pslose (NULLPB, pi, "SRelResponse", sa);
        !            81:            goto out1;
        !            82:        }
        !            83: 
        !            84:     if (status == SC_ACCEPT)
        !            85:        pb -> pb_fd = NOTOK;
        !            86:     else
        !            87:        pb -> pb_flags &= ~PB_FINN;
        !            88: 
        !            89:     result = OK;
        !            90: 
        !            91: out2: ;
        !            92:     if (result == NOTOK || status == SC_ACCEPT)
        !            93:        freepblk (pb);
        !            94: out1: ;
        !            95:     if (base)
        !            96:        free (base);
        !            97: 
        !            98:     (void) sigiomask (smask);
        !            99: 
        !           100:     return result;
        !           101: }

unix.superglobalmegacorp.com

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