|
|
1.1 ! root 1: /* psapresync2.c - PPM: respond to resyncs */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/psap2/RCS/psapresync2.c,v 7.0 89/11/23 22:14:32 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/psap2/RCS/psapresync2.c,v 7.0 89/11/23 22:14:32 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: psapresync2.c,v $ ! 12: * Revision 7.0 89/11/23 22:14:32 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.RESPONSE */ ! 35: ! 36: int PReSyncResponse (sd, ssn, settings, data, ndata, pi) ! 37: int sd; ! 38: int settings, ! 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, "resync"); ! 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-RESYNCHRONIZE user-data", PPDU_RSA)) != OK) ! 62: goto out2; ! 63: ! 64: if ((result = SReSyncResponse (sd, ssn, settings, base, len, &sis)) ! 65: == NOTOK) ! 66: if (SC_FATAL (sa -> sa_reason)) ! 67: (void) ss2pslose (pb, pi, "SReSyncResponse", sa); ! 68: else { ! 69: (void) ss2pslose (NULLPB, pi, "SReSyncResponse", sa); ! 70: goto out1; ! 71: } ! 72: ! 73: out2: ; ! 74: if (result == NOTOK) ! 75: freepblk (pb); ! 76: else ! 77: if (result == DONE) ! 78: result = NOTOK; ! 79: out1: ; ! 80: if (realbase) ! 81: free (realbase); ! 82: else ! 83: if (base) ! 84: free (base); ! 85: ! 86: (void) sigiomask (smask); ! 87: ! 88: return result; ! 89: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.