|
|
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: 2613 (0xa35)
Types: TextFile
Names: »rt2psreleas1.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/rtsap/rt2psreleas1.c«
/* rt2psreleas1.c - RTPM: initiate release */
#ifndef lint
static char *rcsid = "$Header: /f/osi/rtsap/RCS/rt2psreleas1.c,v 7.0 89/11/23 22:22:22 mrose Rel $";
#endif
/*
* $Header: /f/osi/rtsap/RCS/rt2psreleas1.c,v 7.0 89/11/23 22:22:22 mrose Rel $
*
*
* $Log: rt2psreleas1.c,v $
* Revision 7.0 89/11/23 22:22:22 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 "rtpkt.h"
/* \f
RT-CLOSE.REQUEST */
int RtCloseRequest (sd, reason, data, acr, rti)
int sd,
reason;
PE data;
struct AcSAPrelease *acr;
struct RtSAPindication *rti;
{
SBV smask;
int result;
register struct assocblk *acb;
missingP (acr);
missingP (rti);
smask = sigioblock ();
rtsapPsig (acb, sd);
result = RtCloseRequestAux (acb, reason, data, acr, rti);
(void) sigiomask (smask);
return result;
}
/* \f
*/
static int RtCloseRequestAux (acb, reason, data, acr, rti)
register struct assocblk *acb;
int reason;
PE data;
struct AcSAPrelease *acr;
register struct RtSAPindication *rti;
{
int result;
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");
if (!(acb -> acb_flags & ACB_INIT) && (acb -> acb_flags & ACB_TWA))
return rtsaplose (rti, RTS_OPERATION, NULLCP, "not initiator");
if (!(acb -> acb_flags & ACB_TURN))
return rtsaplose (rti, RTS_OPERATION, NULLCP, "turn not owned by you");
if (acb -> acb_flags & ACB_ACT)
return rtsaplose (rti, RTS_OPERATION, NULLCP, "transfer in progress");
if (acb -> acb_flags & ACB_PLEASE)
return rtsaplose (rti, RTS_WAITING, NULLCP, NULLCP);
if (data)
data -> pe_context = acb -> acb_rtsid;
acb -> acb_flags &= ~ACB_STICKY;
if (AcRelRequest (acb -> acb_fd, reason, &data, data ? 1 : 0, NOTOK, acr,
aci) == NOTOK) {
if (aca -> aca_source == ACA_USER)
result = acs2rtsabort (acb, aca, rti);
else
result = acs2rtslose (acb, rti, "AcRelRequest", aca);
}
else
if (!acr -> acr_affirmative)
result = rtpktlose (acb, rti, RTS_PROTOCOL, NULLCP,
"other side refused to release association");
else
result = OK;
return result;
}