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