/* acsaplose.c - ACPM: you lose */
static char *rcsid
= "$Header: /f/osi/acsap/RCS/acsaplose.c,v 7.2 91/02/22 09:14:11 mrose Interim $";
* $Header: /f/osi/acsap/RCS/acsaplose.c,v 7.2 91/02/22 09:14:11 mrose Interim $
* Revision 7.2 91/02/22 09:14:11 mrose
* Revision 7.1 90/07/01 21:01:58 mrose
* Revision 7.0 89/11/23 21:21:52 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
register struct assocblk
*acb
;
register struct AcSAPindication
*aci
;
struct PSAPindication pis
;
struct type_ACS_ABRT__apdu pdus
;
register struct type_ACS_ABRT__apdu
*pdu
= &pdus
;
acb
= va_arg (ap
, struct assocblk
*);
aci
= va_arg (ap
, struct AcSAPindication
*);
reason
= va_arg (ap
, int);
result
= _acsaplose (aci
, reason
, ap
);
if (acb
== NULLACB
|| acb
-> acb_fd
== NOTOK
)
if (acb
-> acb_sversion
== 1) {
if (PUAbortRequest (acb
-> acb_fd
, NULLPEP
, 0, &pis
) != NOTOK
)
pdu
-> abort__source
= int_ACS_abort__source_acse__service__provider
;
pdu
-> user__information
= NULL
;
if (encode_ACS_ABRT__apdu (&pe
, 1, 0, NULLCP
, pdu
) != NOTOK
) {
pe
-> pe_context
= acb
-> acb_id
;
PLOGP (acsap_log
,ACS_ACSE__apdu
, pe
, "ABRT-apdu", 0);
if (PUAbortRequest (acb
-> acb_fd
, &pe
, 1, &pis
) != NOTOK
)
int acpktlose (acb
, aci
, reason
, what
, fmt
)
struct AcSAPindication
*aci
;
return acpktlose (acb
, aci
, reason
, what
, fmt
);
struct AcSAPindication
*aci
;
aci
= va_arg (ap
, struct AcSAPindication
*);
reason
= va_arg (ap
, int);
result
= _acsaplose (aci
, reason
, ap
);
int acsaplose (aci
, reason
, what
, fmt
)
struct AcSAPindication
*aci
;
return acsaplose (aci
, reason
, what
, fmt
);
static int _acsaplose (aci
, reason
, ap
) /* what, fmt, args ... */
register struct AcSAPindication
*aci
;
register struct AcSAPabort
*aca
;
bzero ((char *) aci
, sizeof *aci
);
aci
-> aci_type
= ACI_ABORT
;
asprintf (bp
= buffer
, ap
);
aca
-> aca_source
= ACA_LOCAL
;
aca
-> aca_reason
= reason
;
copyAcSAPdata (buffer
, bp
- buffer
, aca
);