|
|
BSD 4.3reno
/* ssapselect.c - SPM: map descriptors */
#ifndef lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/ssap/ssapselect.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $";
#endif
/*
* $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/ssap/ssapselect.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
*
*
* $Log: ssapselect.c,v $
* Revision 1.1.1.1 2018/04/24 16:12:56 root
* BSD 4.3reno
*
* Revision 7.0 89/11/23 22:25:50 mrose
* Release 6.0
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
/* LINTLIBRARY */
#include <stdio.h>
#include <signal.h>
#include "spkt.h"
/* map session descriptors for select() */
int SSelectMask (sd, mask, nfds, si)
int sd;
fd_set *mask;
int *nfds;
register struct SSAPindication *si;
{
SBV smask;
int result;
register struct ssapblk *sb;
struct TSAPdisconnect tds;
register struct TSAPdisconnect *td = &tds;
missingP (mask);
missingP (nfds);
smask = sigioblock ();
if ((sb = findsblk (sd)) == NULL) {
(void) sigiomask (smask);
return ssaplose (si, SC_PARAMETER, NULLCP,
"invalid session descriptor");
}
if ((result = TSelectMask (sb -> sb_fd, mask, nfds, td)) == NOTOK)
if (td -> td_reason == DR_WAITING)
(void) ssaplose (si, SC_WAITING, NULLCP, NULLCP);
else
(void) ts2sslose (si, "TSelectMask", td);
(void) sigiomask (smask);
return result;
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.