|
|
1.1 root 1: /* psapmajor1.c - PPM: initiate majorsyncs */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/psap2/RCS/psapmajor1.c,v 7.0 89/11/23 22:14:22 mrose Rel $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/psap2/RCS/psapmajor1.c,v 7.0 89/11/23 22:14:22 mrose Rel $
9: *
10: *
11: * $Log: psapmajor1.c,v $
12: * Revision 7.0 89/11/23 22:14:22 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-{MAJOR-SYNC,ACTIVITY-END}.REQUEST */
35:
36: int PMajSyncRequestAux (sd, ssn, data, ndata, pi, dtype, sfunc, stype)
37: int sd;
38: long *ssn;
39: int ndata;
40: PE *data;
41: struct PSAPindication *pi;
42: char *dtype,
43: *stype;
44: IFP sfunc;
45: {
46: SBV smask;
47: int len,
48: result;
49: char *base,
50: *realbase;
51: register struct psapblk *pb;
52: struct SSAPindication sis;
53: register struct SSAPabort *sa = &sis.si_abort;
54:
55: toomuchP (data, ndata, NPDATA, dtype);
56: missingP (pi);
57: missingP (sfunc);
58: missingP (stype);
59:
60: smask = sigioblock ();
61:
62: psapPsig (pb, sd);
63:
64: if ((result = info2ssdu (pb, pi, data, ndata, &realbase, &base, &len,
65: "P-MAJOR-SYNC (ACTIVITY-END) user-data",
66: PPDU_NONE)) != OK)
67: goto out2;
68:
69: if ((result = (*sfunc) (sd, ssn, base, len, &sis)) == NOTOK)
70: if (SC_FATAL (sa -> sa_reason))
71: (void) ss2pslose (pb, pi, stype, sa);
72: else {
73: (void) ss2pslose (NULLPB, pi, stype, sa);
74: goto out1;
75: }
76:
77: out2: ;
78: if (result == NOTOK)
79: freepblk (pb);
80: else
81: if (result == DONE)
82: result = NOTOK;
83: out1: ;
84: if (realbase)
85: free (realbase);
86: else
87: if (base)
88: free (base);
89:
90: (void) sigiomask (smask);
91:
92: return result;
93: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.