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