/* rosapureject.c - ROPM: user reject */
static char *rcsid
= "$Header: /f/osi/rosap/RCS/rosapureject.c,v 7.2 91/02/22 09:41:38 mrose Interim $";
* $Header: /f/osi/rosap/RCS/rosapureject.c,v 7.2 91/02/22 09:41:38 mrose Interim $
* Based on an TCP-based implementation by George Michaelson of University
* $Log: rosapureject.c,v $
* Revision 7.2 91/02/22 09:41:38 mrose
* Revision 7.1 90/10/23 20:44:22 mrose
* Revision 6.0 89/03/18 23:42:32 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
/* \f RO-U-REJECT.REQUEST */
int RoURejectRequest (sd
, invokeID
, reason
, priority
, roi
)
struct RoSAPindication
*roi
;
register struct assocblk
*acb
;
case ROS_IP_DUP
: /* Invoke Problem */
reason
-= REJECT_INVOKE_BASE
;
reason
-= REJECT_INVOKE_BASE
;
case ROS_RRP_UNRECOG
: /* Return Result Problem */
reason
-= REJECT_RESULT_BASE
;
case ROS_REP_UNRECOG
: /* Return Error Problem */
reason
-= REJECT_ERROR_BASE
;
return rosaplose (roi
, ROS_PARAMETER
, NULLCP
,
"bad value for reason parameter");
result
= RoURejectRequestAux (acb
, invokeID
, reason
, id
, priority
, roi
);
(void) sigiomask (smask
);
int RoURejectRequestAux (acb
, invokeID
, reason
, id
, priority
, roi
)
register struct assocblk
*acb
;
struct RoSAPindication
*roi
;
if (id
== REJECT_COMPLETE
)
if (acb
-> acb_flags
& ACB_ACS
)
return rosaplose (roi
, ROS_PARAMETER
, NULLCP
,
"bad value for reason parameter");
&& !(acb
-> acb_flags
& ACB_TURN
)
&& (*acb
-> acb_ready
) (acb
, priority
, roi
) == NOTOK
)
if ((pe
= pe_alloc (PE_CLASS_CONT
, PE_FORM_CONS
, APDU_REJECT
)) == NULLPE
|| ((acb
-> acb_flags
& ACB_ACS
)
: set_add (pe
, p
= pe_alloc (PE_CLASS_UNIV
, PE_FORM_CONS
,
|| seq_add (p
, invokeID
? int2prim (*invokeID
)
: pe_alloc (PE_CLASS_UNIV
, PE_FORM_PRIM
,
PE_PRIM_NULL
), -1) == NOTOK
|| seq_add (p
, num2prim ((integer
) reason
, PE_CLASS_CONT
, id
), -1)
return rosaplose (roi
, ROS_CONGEST
, NULLCP
, "out of memory");
return (*acb
-> acb_putosdu
) (acb
, pe
, NULLPE
, priority
, roi
);