/* acsapblock.c - manage association blocks */
static char *rcsid
= "$Header: /f/osi/acsap/RCS/acsapblock.c,v 7.2 91/02/22 09:14:05 mrose Interim $";
* $Header: /f/osi/acsap/RCS/acsapblock.c,v 7.2 91/02/22 09:14:05 mrose Interim $
* Revision 7.2 91/02/22 09:14:05 mrose
* Revision 7.1 91/01/24 14:49:54 mrose
* Revision 7.0 89/11/23 21:21:46 mrose
* 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
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
);
ACHead
-> acb_forw
= ACHead
-> acb_back
= ACHead
;
insque (acb
, ACHead
-> acb_back
);
register struct assocblk
*acb
;
if (acb
-> acb_flags
& ACB_STICKY
) {
acb
-> acb_flags
&= ~ACB_STICKY
;
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
);
struct PSAPindication pis
;
(void) (*acb
-> acb_uabort
) (acb
-> acb_fd
, NULLPEP
, 0, &pis
);
struct SSAPindication sis
;
(void) (*acb
-> acb_uabort
) (acb
-> acb_fd
, NULLCP
, 0, &sis
);
if (acb
-> acb_flags
& ACB_FINISH
)
ACFFREE (&acb
-> acb_finish
);
oid_free (acb
-> acb_context
);
pe_free (acb
-> acb_retry
);
pe_free (acb
-> acb_apdu
);
struct assocblk
*findacblk (sd
)
register struct assocblk
*acb
;
for (acb
= ACHead
-> acb_forw
; acb
!= ACHead
; acb
= acb
-> acb_forw
)