Annotation of 43BSDReno/contrib/isode-beta/psap2/psapresync1.c, revision 1.1.1.1

1.1       root        1: /* psapresync1.c - PPM: initiate resyncs */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/psap2/RCS/psapresync1.c,v 7.0 89/11/23 22:14:31 mrose Rel $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/psap2/RCS/psapresync1.c,v 7.0 89/11/23 22:14:31 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       psapresync1.c,v $
                     12:  * Revision 7.0  89/11/23  22:14:31  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-RESYNCHRONIZE.REQUEST */
                     35: 
                     36: int    PReSyncRequest (sd, type, ssn, settings, data, ndata, pi)
                     37: int    sd;
                     38: int    type,
                     39:        settings,
                     40:        ndata;
                     41: long   ssn;
                     42: PE     *data;
                     43: struct PSAPindication *pi;
                     44: {
                     45:     SBV            smask;
                     46:     int     len,
                     47:            result;
                     48:     char   *base,
                     49:           *realbase;
                     50:     register struct psapblk *pb;
                     51:     struct SSAPindication   sis;
                     52:     register struct SSAPabort  *sa = &sis.si_abort;
                     53: 
                     54:     toomuchP (data, ndata, NPDATA, "resync");
                     55:     missingP (pi);
                     56: 
                     57:     smask = sigioblock ();
                     58: 
                     59:     psapPsig (pb, sd);
                     60: 
                     61:     if ((result = info2ssdu (pb, pi, data, ndata, &realbase, &base, &len,
                     62:                             "P-RESYNCHRONIZE user-data", PPDU_RS)) != OK)
                     63:        goto out2;
                     64: 
                     65:     if ((result = SReSyncRequest (sd, type, ssn, settings, base, len, &sis))
                     66:            == NOTOK)
                     67:        if (SC_FATAL (sa -> sa_reason))
                     68:            (void) ss2pslose (pb, pi, "SReSyncRequest", sa);
                     69:        else {
                     70:            (void) ss2pslose (NULLPB, pi, "SReSyncRequest", sa);
                     71:            goto out1;
                     72:        }
                     73: 
                     74: out2: ;
                     75:     if (result == NOTOK)
                     76:        freepblk (pb);
                     77:     else
                     78:        if (result == DONE)
                     79:            result = NOTOK;
                     80: out1: ;
                     81:     if (realbase)
                     82:        free (realbase);
                     83:     else
                     84:        if (base)
                     85:            free (base);
                     86: 
                     87:     (void) sigiomask (smask);
                     88: 
                     89:     return result;
                     90: }

unix.superglobalmegacorp.com

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