|
|
1.1 ! root 1: /* ssapcapd2.c - SPM: read capability data */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/ssap/RCS/ssapcapd2.c,v 7.0 89/11/23 22:25:24 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/ssap/RCS/ssapcapd2.c,v 7.0 89/11/23 22:25:24 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: ssapcapd2.c,v $ ! 12: * Revision 7.0 89/11/23 22:25: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 "spkt.h" ! 33: ! 34: /* S-CAPABILITY-DATA.RESPONSE */ ! 35: ! 36: int SCapdResponse (sd, data, cc, si) ! 37: int sd; ! 38: char *data; ! 39: int cc; ! 40: struct SSAPindication *si; ! 41: { ! 42: SBV smask; ! 43: int result; ! 44: register struct ssapblk *sb; ! 45: ! 46: missingP (si); ! 47: ! 48: smask = sigioblock (); ! 49: ! 50: ssapPsig (sb, sd); ! 51: toomuchP (sb, data, cc, SX_CDASIZE, "capability"); ! 52: ! 53: result = SCapdResponseAux (sb, data, cc, si); ! 54: ! 55: (void) sigiomask (smask); ! 56: ! 57: return result; ! 58: } ! 59: ! 60: /* */ ! 61: ! 62: static int SCapdResponseAux (sb, data, cc, si) ! 63: register struct ssapblk *sb; ! 64: char *data; ! 65: int cc; ! 66: struct SSAPindication *si; ! 67: { ! 68: int result; ! 69: ! 70: if (!(sb -> sb_requirements & SR_CAPABILITY)) ! 71: return ssaplose (si, SC_OPERATION, NULLCP, ! 72: "capability data exchange service unavailable"); ! 73: if (!(sb -> sb_flags & SB_CDA)) ! 74: return ssaplose (si, SC_OPERATION, NULLCP, ! 75: "no capability data response in progress"); ! 76: ! 77: if ((result = SWriteRequestAux (sb, SPDU_CDA, data, cc, 0, 0L, 0, NULLSD, ! 78: NULLSD, NULLSR, si)) == NOTOK) ! 79: freesblk (sb); ! 80: else ! 81: sb -> sb_flags &= ~SB_CDA; ! 82: ! 83: return result; ! 84: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.