|
|
1.1 ! root 1: /* ssapselect.c - SPM: map descriptors */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/ssap/RCS/ssapselect.c,v 7.0 89/11/23 22:25:50 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/ssap/RCS/ssapselect.c,v 7.0 89/11/23 22:25:50 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: ssapselect.c,v $ ! 12: * Revision 7.0 89/11/23 22:25:50 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: /* map session descriptors for select() */ ! 35: ! 36: int SSelectMask (sd, mask, nfds, si) ! 37: int sd; ! 38: fd_set *mask; ! 39: int *nfds; ! 40: register struct SSAPindication *si; ! 41: { ! 42: SBV smask; ! 43: int result; ! 44: register struct ssapblk *sb; ! 45: struct TSAPdisconnect tds; ! 46: register struct TSAPdisconnect *td = &tds; ! 47: ! 48: missingP (mask); ! 49: missingP (nfds); ! 50: ! 51: smask = sigioblock (); ! 52: ! 53: if ((sb = findsblk (sd)) == NULL) { ! 54: (void) sigiomask (smask); ! 55: return ssaplose (si, SC_PARAMETER, NULLCP, ! 56: "invalid session descriptor"); ! 57: } ! 58: ! 59: if ((result = TSelectMask (sb -> sb_fd, mask, nfds, td)) == NOTOK) ! 60: if (td -> td_reason == DR_WAITING) ! 61: (void) ssaplose (si, SC_WAITING, NULLCP, NULLCP); ! 62: else ! 63: (void) ts2sslose (si, "TSelectMask", td); ! 64: ! 65: (void) sigiomask (smask); ! 66: ! 67: return result; ! 68: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.