|
|
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 r
Length: 2387 (0x953)
Types: TextFile
Names: »rt2psabort.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/rtsap/rt2psabort.c«
/* rt2psabort.c - RTPM: user abort */
#ifndef lint
static char *rcsid = "$Header: /f/osi/rtsap/RCS/rt2psabort.c,v 6.0 89/03/18 23:43:08 mrose Rel $";
#endif
/*
* $Header: /f/osi/rtsap/RCS/rt2psabort.c,v 6.0 89/03/18 23:43:08 mrose Rel $
*
*
* $Log: rt2psabort.c,v $
* Revision 6.0 89/03/18 23:43: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 <signal.h>
#include "rtpkt.h"
#include "tailor.h"
/* \f
RT-U-ABORT.REQUEST */
int RtUAbortRequest (sd, data, rti)
int sd;
PE data;
struct RtSAPindication *rti;
{
SBV smask;
int result;
register struct assocblk *acb;
missingP (rti);
smask = sigioblock ();
rtsapPsig (acb, sd);
result = RtUAbortRequestAux (acb, data, rti);
(void) sigiomask (smask);
return result;
}
/* \f
*/
static int RtUAbortRequestAux (acb, data, rti)
register struct assocblk *acb;
PE data;
register struct RtSAPindication *rti;
{
int result;
PE pe,
p;
struct AcSAPindication acis;
register struct AcSAPindication *aci = &acis;
register struct AcSAPabort *aca = &aci -> aci_abort;
if (!(acb -> acb_flags & ACB_ACS))
return rtsaplose (rti, RTS_OPERATION, NULLCP,
"not an association descriptor for RTS");
/* begin RTAB APDU */
if ((pe = pe_alloc (PE_CLASS_UNIV, PE_FORM_CONS, PE_CONS_SET)) == NULLPE
|| set_add (pe, num2prim (ABORT_USER, PE_CLASS_CONT, RTAB_REASON))
== NOTOK
|| (data
&& (set_add (pe, p = pe_alloc (PE_CLASS_CONT, PE_FORM_CONS,
RTAB_USERDATA)) == NOTOK
|| set_add (p, data) == NOTOK))) {
result = rtsaplose (rti, RTS_CONGEST, NULLCP, "out of memory");
(void) AcUAbortRequest (acb -> acb_fd, NULLPEP, 0, aci);
goto out;
}
pe -> pe_context = acb -> acb_rtsid;
/* end RTAB APDU */
PLOG (rtsap_log, print_RTS_RTABapdu, pe, "RTABapdu", 0);
if ((result = AcUAbortRequest (acb -> acb_fd, &pe, 1, aci)) == NOTOK)
(void) acs2rtslose (acb, rti, "AcUAbortRequest", aca);
else
result = OK;
out: ;
if (pe) {
if (data)
(void) pe_extract (pe, data);
pe_free (pe);
}
return result;
}