/* ronotunbind2.c - RONOT: ABSTRACT-BIND mapping onto A-RELEASE.RESPONSE */
static char *rcsid
= "$Header: /f/osi/ronot/RCS/ronotunbind2.c,v 7.2 91/02/22 09:50:35 mrose Interim $";
* $Header: /f/osi/ronot/RCS/ronotunbind2.c,v 7.2 91/02/22 09:50:35 mrose Interim $
* $Log: ronotunbind2.c,v $
* Revision 7.2 91/02/22 09:50:35 mrose
* Revision 7.1 90/07/26 14:34:03 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-UNBIND.INDICATION */
int RoUnBindInit (sd
, acf
, rni
)
struct AcSAPfinish
* acf
;
struct RoNOTindication
* rni
;
* What is provided here is in-line handling of the
* (usually NULL) user data as an unbind argument value.
* A plausible alternative approach is to add a new finish
* routine (in place of AcFINISHser) as an element in a
* new ros-mapping structure so that RoWaitRequest performed
* this automatically for RO-Notation users.
return (ronotlose (rni
, RBI_DEC_NINFO
, NULLCP
, NULLCP
));
if (acf
->acf_info
[0] == NULLPE
)
return (ronotlose (rni
, RBI_DEC_NINFO
, NULLCP
, NULLCP
));
acf
->acf_info
[0] = NULLPE
;
if (decode_RONOT_UnBindArgumentValue (pe
, 1, NULLIP
, NULLVP
, &(acf
->acf_info
[0])) != OK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RO-UNBIND.INDICATION: decode_RONOT_UnBindArgumentValue failed"));
return (ronotlose (rni
, RBI_DEC_BIND_ARG
, NULLCP
, NULLCP
));
/* \f RO-UNBIND.RESULT */
int RoUnBindResult (sd
, unbindrespe
, rni
)
struct RoNOTindication
* rni
;
PE
* user_data_p
= &(user_data
);
struct AcSAPindication aci_s
;
struct AcSAPindication
* aci
= &(aci_s
);
struct AcSAPabort
* aca
= &(aci
->aci_abort
);
if (unbindrespe
!= NULLPE
)
if (encode_RONOT_UnBindResultValue (user_data_p
, 1, 0, NULLCP
, unbindrespe
) == NOTOK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoUnBindResult: encode_RONOT_UnBindResultValue failed"));
return (ronotlose (rni
, RBI_ENC_UNBIND_RES
, NULLCP
, NULLCP
));
(*user_data_p
)->pe_context
= unbindrespe
->pe_context
;
result
= AcRelResponse (sd
, ACS_ACCEPT
, ACF_NORMAL
, user_data_p
, ndata
, aci
);
if ((*user_data_p
) != NULLPE
)
pe_free ((*user_data_p
));
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoUnBindResult: AcRelResponse failed"));
/* Have an AcSAPindication, need to return RoNOTindication */
(void) acs2ronotlose (rni
, "RO-UNBIND.RESULT", aca
);
int RoUnBindError (sd
, unbinderrpe
, rni
)
struct RoNOTindication
* rni
;
PE
* user_data_p
= &(user_data
);
struct AcSAPindication aci_s
;
struct AcSAPindication
* aci
= &(aci_s
);
struct AcSAPabort
* aca
= &(aci
->aci_abort
);
if (unbinderrpe
!= NULLPE
)
if (encode_RONOT_UnBindErrorValue (user_data_p
, 1, 0, NULLCP
, unbinderrpe
) == NOTOK
)
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoUnBindError: encode_RONOT_UnBindErrorValue failed"));
return (ronotlose (rni
, RBI_ENC_UNBIND_ERR
, NULLCP
, NULLCP
));
(*user_data_p
)->pe_context
= unbinderrpe
->pe_context
;
result
= AcRelResponse (sd
, ACS_REJECT
, ACR_NOTFINISHED
, user_data_p
, ndata
, aci
);
if ((*user_data_p
) != NULLPE
)
pe_free ((*user_data_p
));
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoUnBindError: AcRelResponse failed"));
(void) acs2ronotlose (rni
, "RO-UNBIND.ERROR", aca
);
/* \f RO-UNBIND.REJECT */
int RoUnBindReject (sd
, status
, reason
, rni
)
struct RoNOTindication
* rni
;
struct AcSAPindication aci_s
;
struct AcSAPindication
* aci
= &(aci_s
);
struct AcSAPabort
* aca
= &(aci
->aci_abort
);
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoUnBindReject: RO-UNBIND.REJECT called on %d", sd
));
result
= AcRelResponse (sd
, status
, reason
, NULLPEP
, 0, aci
);
LLOG (rosap_log
, LLOG_EXCEPTIONS
, ("RoUnBindReject: AcRelResponse failed"));
(void) acs2ronotlose (rni
, "RO-UNBIND.ERROR", aca
);