Annotation of 43BSDReno/contrib/isode-beta/ssap/ssapexpd.c, revision 1.1.1.1

1.1       root        1: /* ssapexpd.c - SPM: write expedited data */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/ssap/RCS/ssapexpd.c,v 7.0 89/11/23 22:25:27 mrose Rel $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/ssap/RCS/ssapexpd.c,v 7.0 89/11/23 22:25:27 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       ssapexpd.c,v $
                     12:  * Revision 7.0  89/11/23  22:25:27  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 "spkt.h"
                     33: 
                     34: /*    S-EXPEDITED-DATA.REQUEST */
                     35: 
                     36: int    SExpdRequest (sd, data, cc, si)
                     37: int    sd;
                     38: char   *data;
                     39: int    cc;
                     40: struct SSAPindication  *si;
                     41: {
                     42:     SBV            smask;
                     43:     int     result;
                     44:     register struct ssapblk *sb;
                     45: 
                     46:     missingP (data);
                     47:     if (cc > SX_EXSIZE)
                     48:        return ssaplose (si, SC_PARAMETER, NULLCP,
                     49:                         "too much expedited user data, %d octets", cc);
                     50:     missingP (si);
                     51: 
                     52:     smask = sigioblock ();
                     53: 
                     54:     ssapPsig (sb, sd);
                     55: 
                     56:     result = SExpdRequestAux (sb, data, cc, si);
                     57: 
                     58:     (void) sigiomask (smask);
                     59: 
                     60:     return result;
                     61: }
                     62: 
                     63: /*  */
                     64: 
                     65: static int  SExpdRequestAux (sb, data, cc, si)
                     66: register struct ssapblk *sb;
                     67: char   *data;
                     68: int    cc;
                     69: struct SSAPindication  *si;
                     70: {
                     71:     int     result;
                     72:     register struct ssapkt *s;
                     73: 
                     74:     if (!(sb -> sb_requirements & SR_EXPEDITED))
                     75:        return ssaplose (si, SC_OPERATION, NULLCP,
                     76:                    "expedited data service unavailable");
                     77: 
                     78:     if ((s = newspkt (SPDU_EX)) == NULL)
                     79:        return ssaplose (si, SC_CONGEST, NULLCP, "out of memory");
                     80: 
                     81:     s -> s_udata = data, s -> s_ulen = cc;
                     82:     result = spkt2sd (s, sb -> sb_fd, 1, si);
                     83:     s -> s_udata = NULL, s -> s_ulen = 0;
                     84: 
                     85:     freespkt (s);
                     86: 
                     87:     if (result == NOTOK)
                     88:        freesblk (sb);
                     89: 
                     90:     return result;
                     91: }

unix.superglobalmegacorp.com

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