|
|
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: 3329 (0xd01)
Types: TextFile
Names: »rosapureject.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/rosap/rosapureject.c«
/* rosapureject.c - ROPM: user reject */
#ifndef lint
static char *rcsid = "$Header: /f/osi/rosap/RCS/rosapureject.c,v 7.0 89/11/23 22:21:35 mrose Rel $";
#endif
/*
* $Header: /f/osi/rosap/RCS/rosapureject.c,v 7.0 89/11/23 22:21:35 mrose Rel $
*
* Based on an TCP-based implementation by George Michaelson of University
* College London.
*
*
* $Log: rosapureject.c,v $
* Revision 7.0 89/11/23 22:21:35 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 "ropkt.h"
/* \f
RO-U-REJECT.REQUEST */
int RoURejectRequest (sd, invokeID, reason, priority, roi)
int sd;
int *invokeID,
reason,
priority;
struct RoSAPindication *roi;
{
SBV smask;
int result;
PElementID id;
register struct assocblk *acb;
switch (reason) {
case ROS_IP_DUP: /* Invoke Problem */
case ROS_IP_UNRECOG:
case ROS_IP_MISTYPED:
case ROS_IP_LIMIT:
id = REJECT_INVOKE;
reason -= REJECT_INVOKE_BASE;
break;
case ROS_IP_RELEASE:
case ROS_IP_UNLINKED:
case ROS_IP_LINKED:
case ROS_IP_CHILD:
id = REJECT_COMPLETE;
reason -= REJECT_INVOKE_BASE;
break;
case ROS_RRP_UNRECOG: /* Return Result Problem */
case ROS_RRP_UNEXP:
case ROS_RRP_MISTYPED:
id = REJECT_RESULT;
reason -= REJECT_RESULT_BASE;
break;
case ROS_REP_UNRECOG: /* Return Error Problem */
case ROS_REP_UNEXP:
case ROS_REP_RECERR:
case ROS_REP_UNEXPERR:
case ROS_REP_MISTYPED:
id = REJECT_ERROR;
reason -= REJECT_ERROR_BASE;
break;
default:
return rosaplose (roi, ROS_PARAMETER, NULLCP,
"bad value for reason parameter");
}
missingP (roi);
smask = sigioblock ();
rosapPsig (acb, sd);
result = RoURejectRequestAux (acb, invokeID, reason, id, priority, roi);
(void) sigiomask (smask);
return result;
}
/* \f
*/
int RoURejectRequestAux (acb, invokeID, reason, id, priority, roi)
register struct assocblk *acb;
int *invokeID,
reason,
priority;
PElementID id;
struct RoSAPindication *roi;
{
register PE pe,
p;
if (id == REJECT_COMPLETE)
if (acb -> acb_flags & ACB_ACS)
id = REJECT_INVOKE;
else
return rosaplose (roi, ROS_PARAMETER, NULLCP,
"bad value for reason parameter");
if (acb -> acb_ready
&& !(acb -> acb_flags & ACB_TURN)
&& (*acb -> acb_ready) (acb, priority, roi) == NOTOK)
return NOTOK;
/* begin Reject APDU */
if ((pe = pe_alloc (PE_CLASS_CONT, PE_FORM_CONS, APDU_REJECT)) == NULLPE
|| ((acb -> acb_flags & ACB_ACS)
? (p = pe, 0)
: set_add (pe, p = pe_alloc (PE_CLASS_UNIV, PE_FORM_CONS,
PE_CONS_SEQ)) == NOTOK)
|| seq_add (p, invokeID ? int2prim (*invokeID)
: pe_alloc (PE_CLASS_UNIV, PE_FORM_PRIM,
PE_PRIM_NULL), -1) == NOTOK
|| seq_add (p, num2prim (reason, PE_CLASS_CONT, id), -1)
== NOTOK) {
if (pe)
pe_free (pe);
freeacblk (acb);
return rosaplose (roi, ROS_CONGEST, NULLCP, "out of memory");
}
/* end Reject APDU */
return (*acb -> acb_putosdu) (acb, pe, NULLPE, priority, roi);
}