/* dsaperror.c - DSAP : Return operation errors */
static char *rcsid
= "$Header: /f/osi/dsap/net/RCS/dsaperror.c,v 7.1 91/02/22 09:21:18 mrose Interim $";
* $Header: /f/osi/dsap/net/RCS/dsaperror.c,v 7.1 91/02/22 09:21:18 mrose Interim $
* Revision 7.1 91/02/22 09:21:18 mrose
* Revision 7.0 90/07/26 14:45:52 mrose
* *** empty log message ***
* 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
#include "../x500as/DAS-types.h"
int DapErrorRequest (sd
, id
, err
, di
)
struct DSAPindication
* di
;
struct RoSAPindication roi_s
;
struct RoSAPindication
* roi
= &(roi_s
);
struct RoSAPpreject
* rop
= &(roi
->roi_preject
);
if (DEncodeError (&(err_pe
), err
) != OK
)
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapErrorRequest: Encoding failed"));
return (dsapreject (di
, DP_INVOKE
, id
, NULLCP
, "Failed to encode operation error"));
watch_dog ("RoErrorRequest (DAP)");
result
= RoErrorRequest (sd
, id
, err
->dse_type
, err_pe
, ROS_NOPRIO
, roi
);
if (ROS_FATAL (rop
->rop_reason
) || (rop
->rop_reason
== ROS_PARAMETER
))
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapErrorRequest(): Fatal rejection"));
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "RoErrorRequest failed"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapErrorRequest(): Non-Fatal rejection"));
return (dsapreject (di
, DP_INVOKE
, id
, NULLCP
, "RoErrorRequest failed"));
int DspErrorRequest (sd
, id
, err
, di
)
struct DSAPindication
* di
;
struct RoSAPindication roi_s
;
struct RoSAPindication
* roi
= &(roi_s
);
struct RoSAPpreject
* rop
= &(roi
->roi_preject
);
if (DEncodeError (&(err_pe
), err
) != OK
)
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspErrorRequest: Encoding failed"));
return (dsapreject (di
, DP_INVOKE
, id
, NULLCP
, "Failed to encode operation error"));
watch_dog ("RoErrorRequest (DSP)");
result
= RoErrorRequest (sd
, id
, err
->dse_type
, err_pe
, ROS_NOPRIO
, roi
);
if (ROS_FATAL (rop
->rop_reason
) || (rop
->rop_reason
== ROS_PARAMETER
))
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspErrorRequest(): Fatal rejection"));
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "RoErrorRequest failed"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspErrorRequest(): Non-Fatal rejection"));
return (dsapreject (di
, DP_INVOKE
, id
, NULLCP
, "RoErrorRequest failed"));
int QspErrorRequest (sd
, id
, err
, di
)
struct DSAPindication
* di
;
struct RoSAPindication roi_s
;
struct RoSAPindication
* roi
= &(roi_s
);
struct RoSAPpreject
* rop
= &(roi
->roi_preject
);
if (DEncodeError (&(err_pe
), err
) != OK
)
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspErrorRequest: Encoding failed"));
return (dsapreject (di
, DP_INVOKE
, id
, NULLCP
, "Failed to encode operation error"));
watch_dog ("RoErrorRequest (QSP)");
result
= RoErrorRequest (sd
, id
, err
->dse_type
, err_pe
, ROS_NOPRIO
, roi
);
if (ROS_FATAL (rop
->rop_reason
) || (rop
->rop_reason
== ROS_PARAMETER
))
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspErrorRequest(): Fatal rejection"));
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "RoErrorRequest failed"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspErrorRequest(): Non-Fatal rejection"));
return (dsapreject (di
, DP_INVOKE
, id
, NULLCP
, "RoErrorRequest failed"));
int DEncodeError(pep
, err
)
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("DEncodeError(): no error"));
case DSE_ABANDON_FAILED
:
success
= encode_DAS_AbandonFailedParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_abandon_fail
));
case DSE_ATTRIBUTEERROR
:
success
= encode_DAS_AttributeErrorParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_attribute
));
success
= encode_DAS_NameErrorParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_name
));
success
= encode_DAS_ReferralParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_referral
));
success
= encode_DAS_SecurityErrorParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_security
));
success
= encode_DAS_ServiceErrorParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_service
));
success
= encode_DAS_UpdateErrorParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_update
));
success
= encode_DO_DSAReferralParm(pep
,1,0,NULLCP
,&(err
->dse_un
.dse_un_referral
));
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("DEncodeError(): unknown error %d", err
->dse_type
));