|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 2359 (0x937) Types: TextFile Names: »acsapblock.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/acsap/acsapblock.c«
/* acsapblock.c - manage association blocks */ #ifndef lint static char *rcsid = "$Header: /f/osi/acsap/RCS/acsapblock.c,v 6.0 89/03/18 23:24:08 mrose Rel $"; #endif /* * $Header: /f/osi/acsap/RCS/acsapblock.c,v 6.0 89/03/18 23:24:08 mrose Rel $ * * * $Log: acsapblock.c,v $ * Revision 6.0 89/03/18 23:24:08 mrose * Release 5.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 "acpkt.h" /* \f DATA */ static int once_only = 0; static struct assocblk assocque; static struct assocblk *ACHead = &assocque; /* \f ASSOCIATION BLOCKS */ struct assocblk *newacblk () { register struct assocblk *acb; acb = (struct assocblk *) calloc (1, sizeof *acb); if (acb == NULL) return NULL; acb -> acb_fd = NOTOK; if (once_only == 0) { ACHead -> acb_forw = ACHead -> acb_back = ACHead; once_only++; } insque (acb, ACHead -> acb_back); return acb; } /* \f */ freeacblk (acb) register struct assocblk *acb; { if (acb == NULL) return; if (acb -> acb_flags & ACB_STICKY) { acb -> acb_flags &= ~ACB_STICKY; return; } if (acb -> acb_fd != NOTOK && acb -> acb_uabort) if (acb -> acb_flags & ACB_ACS) { if (acb -> acb_flags & ACB_RTS) {/* recurse */ struct AcSAPindication acis; (void) (*acb -> acb_uabort) (acb -> acb_fd, NULLPEP, 0, &acis); return; } else { struct PSAPindication pis; (void) (*acb -> acb_uabort) (acb -> acb_fd, NULLPEP, 0, &pis); } } else { struct SSAPindication sis; (void) (*acb -> acb_uabort) (acb -> acb_fd, NULLCP, 0, &sis); } if (acb -> acb_flags & ACB_FINISH) ACFFREE (&acb -> acb_finish); if (acb -> acb_context) oid_free (acb -> acb_context); FREEACB (acb); if (acb -> acb_apdu) pe_free (acb -> acb_apdu); remque (acb); free ((char *) acb); } /* \f */ struct assocblk *findacblk (sd) register int sd; { register struct assocblk *acb; if (once_only == 0) return NULL; for (acb = ACHead -> acb_forw; acb != ACHead; acb = acb -> acb_forw) if (acb -> acb_fd == sd) return acb; return NULL; }