/* dsapwait.c - DSAP: Deal with incoming activity */
static char *rcsid
= "$Header: /f/osi/dsap/net/RCS/dsapwait.c,v 7.3 91/03/09 11:53:38 mrose Exp $";
* $Header: /f/osi/dsap/net/RCS/dsapwait.c,v 7.3 91/03/09 11:53:38 mrose Exp $
* Revision 7.3 91/03/09 11:53:38 mrose
* Revision 7.2 91/02/22 09:21:30 mrose
* Revision 7.1 90/10/17 11:43:40 mrose
* Revision 7.0 90/07/26 14:46:04 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"
#include "../x500as/Quipu-types.h"
extern unsigned watchdog_time
;
int DWaitRequest (ctx
, sd
, secs
, di
)
struct DSAPindication
* di
;
result
= DapRespWaitRequest (sd
, secs
, di
);
result
= DspWaitRequest (sd
, secs
, di
);
result
= QspWaitRequest (sd
, secs
, di
);
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DWaitRequest: unknown context id %d", ctx
));
return (dsaplose (di
, DA_APP_CONTEXT
, "WAIT REQUEST"));
int DapRespWaitRequest (sd
, secs
, di
)
struct DSAPindication
* di
;
struct RoSAPindication roi_s
;
struct RoSAPindication
* roi
= &(roi_s
);
DLOG (log_dsap
,LLOG_TRACE
,( "DapRespWaitRequest()"));
watch_dog("RoWaitRequset (DAP)");
result
= RoWaitRequest(sd
, secs
, roi
);
if (roi
->roi_preject
.rop_reason
== ROS_TIMER
)
if (ROS_FATAL (roi
->roi_preject
.rop_reason
))
return (ros2dsaplose (di
, "DapRespWaitRequest", &(roi
->roi_preject
)));
return (dsapreject (di
, DP_ROS
, -1, NULLCP
, "DapRespWaitRequest: Non-fatal reject"));
return (DapDecodeInvoke (sd
, &(roi
->roi_invoke
), di
));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapRespWaitRequest: Result received"));
DRejectRequest (sd
, ROS_RRP_UNRECOG
, roi
->roi_result
.ror_id
);
RORFREE (&roi
->roi_result
);
return (dsaplose (di
, DI_RESULT
, NULLCP
, "DAP responder cannot accept results"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapRespWaitRequest: Error received"));
DRejectRequest (sd
, ROS_REP_UNRECOG
, roi
->roi_error
.roe_id
);
ROEFREE (&roi
->roi_error
);
return (dsaplose (di
, DI_RESULT
, NULLCP
, "DAP responder cannot accept errors"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapRespWaitRequest: Operation (%d) user rejected (%d)", roi
->roi_ureject
.rou_id
, roi
->roi_ureject
.rou_reason
));
return (ros2dsapreject(di
, "ROI_UREJECT", &(roi
->roi_ureject
)));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapRespWaitRequest: Operation (%d) provider rejected", roi
->roi_preject
.rop_id
));
result
= ros2dsaplose (di
, "ROI_PREJECT", &(roi
->roi_preject
));
ROPFREE (&(roi
->roi_preject
));
* Should be getting an RoBIND structure here.
* Currently this is simulated with RoUnBindInit, which
* will check that the user data in the release was used
* correctly even though no UnbindArgument is present.
* This is mapped up into D-UNBIND indication.
return (DDecodeUnbind (sd
, &(roi
->roi_finish
), di
));
LLOG (log_dsap
,LLOG_EXCEPTIONS
,( "Unknown indication type : %d", roi
->roi_type
));
return (dsaplose (di
, DA_NO_REASON
, NULLCP
, NULLCP
));
int DspWaitRequest (sd
, secs
, di
)
struct DSAPindication
* di
;
struct RoSAPindication roi_s
;
struct RoSAPindication
* roi
= &(roi_s
);
DLOG (log_dsap
,LLOG_TRACE
,( "DspWaitRequest()"));
watch_dog("RoWaitRequset (DSP)");
result
= RoWaitRequest(sd
, secs
, roi
);
if (roi
->roi_preject
.rop_reason
== ROS_TIMER
)
if (ROS_FATAL (roi
->roi_preject
.rop_reason
))
return (ros2dsaplose (di
, "DspRespWaitRequest", &(roi
->roi_preject
)));
return (dsapreject (di
, DP_ROS
, -1, NULLCP
, "DspRespWaitRequest: Non-fatal reject"));
return (DspDecodeInvoke (sd
, &(roi
->roi_invoke
), di
));
return (DspDecodeResult (sd
, &(roi
->roi_result
), di
));
return (DDecodeError (sd
, &(roi
->roi_error
), di
));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspWaitRequest: Operation (%d) user rejected (%d)", roi
->roi_ureject
.rou_id
, roi
->roi_ureject
.rou_reason
));
return (ros2dsapreject(di
, "ROI_UREJECT", &(roi
->roi_ureject
)));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspWaitRequest: Operation (%d) provider rejected", roi
->roi_preject
.rop_id
));
result
= ros2dsaplose (di
, "ROI_PREJECT", &(roi
->roi_preject
));
ROPFREE (&(roi
->roi_preject
));
* Should be getting an RoBIND structure here.
* Currently this is simulated with RoUnBindInit, which
* will check that the user data in the release was used
* correctly even though no UnbindArgument is present.
* This is mapped up into D-UNBIND indication.
return (DDecodeUnbind (sd
, &(roi
->roi_finish
), di
));
LLOG (log_dsap
,LLOG_EXCEPTIONS
,( "Unknown indication type : %d", roi
->roi_type
));
return (dsaplose (di
, DA_NO_REASON
, NULLCP
, NULLCP
));
int QspWaitRequest (sd
, secs
, di
)
struct DSAPindication
* di
;
struct RoSAPindication roi_s
;
struct RoSAPindication
* roi
= &(roi_s
);
DLOG (log_dsap
,LLOG_TRACE
,( "QspWaitRequest()"));
watch_dog("RoWaitRequset (QSP)");
result
= RoWaitRequest(sd
, secs
, roi
);
if (roi
->roi_preject
.rop_reason
== ROS_TIMER
)
if (ROS_FATAL (roi
->roi_preject
.rop_reason
))
return (ros2dsaplose (di
, "QspRespWaitRequest", &(roi
->roi_preject
)));
return (dsapreject (di
, DP_ROS
, -1, NULLCP
, "QspRespWaitRequest: Non-fatal reject"));
return (QspDecodeInvoke (sd
, &(roi
->roi_invoke
), di
));
return (QspDecodeResult (sd
, &(roi
->roi_result
), di
));
return (DDecodeError (sd
, &(roi
->roi_error
), di
));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspWaitRequest: Operation (%d) user rejected (%d)", roi
->roi_ureject
.rou_id
, roi
->roi_ureject
.rou_reason
));
return (ros2dsapreject(di
, "ROI_UREJECT", &(roi
->roi_ureject
)));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspWaitRequest: Operation (%d) provider rejected", roi
->roi_preject
.rop_id
));
result
= ros2dsaplose (di
, "ROI_PREJECT", &(roi
->roi_preject
));
ROPFREE (&(roi
->roi_preject
));
* Should be getting an RoBIND structure here.
* Currently this is simulated with RoUnBindInit, which
* will check that the user data in the release was used
* correctly even though no UnbindArgument is present.
* This is mapped up into D-UNBIND indication.
return (DDecodeUnbind (sd
, &(roi
->roi_finish
), di
));
LLOG (log_dsap
,LLOG_EXCEPTIONS
,( "Unknown indication type : %d", roi
->roi_type
));
return (dsaplose (di
, DA_NO_REASON
, NULLCP
, NULLCP
));
int DapDecodeInvoke (sd
, rox
, di
)
struct RoSAPinvoke
* rox
;
struct DSAPindication
* di
;
struct ds_op_arg
* dsarg
= &(di
->di_invoke
.dx_arg
);
struct chain_arg
* charg
= &(dsarg
->dca_charg
);
struct DSArgument
* arg
= &(dsarg
->dca_dsarg
);
if (rox
-> rox_nolinked
== 0) {
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapDecodeInvoke: Linked operation (%d) %d",sd
,rox
-> rox_linkid
));
DRejectRequest (sd
, ROS_IP_LINKED
, rox
->rox_id
);
return (dsapreject (di
, DP_INVOKE
, -1, NULLCP
, "Link op"));
di
->di_invoke
.dx_id
= rox
->rox_id
;
switch(arg
->arg_type
= rox
->rox_op
)
success
= decode_DAS_ReadArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_rd
= *dr
; /* struct copy */
struct ds_compare_arg
* dr
;
success
= decode_DAS_CompareArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_cm
= *dr
; /* struct copy */
struct ds_abandon_arg
* dr
;
success
= decode_DAS_AbandonArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_ab
= *dr
; /* struct copy */
success
= decode_DAS_ListArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_ls
= *dr
; /* struct copy */
struct ds_search_arg
* dr
;
success
= decode_DAS_SearchArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_sr
= *dr
; /* struct copy */
struct ds_addentry_arg
* dr
;
success
= decode_DAS_AddEntryArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_ad
= *dr
; /* struct copy */
struct ds_removeentry_arg
* dr
;
success
= decode_DAS_RemoveEntryArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_rm
= *dr
; /* struct copy */
struct ds_modifyentry_arg
* dr
;
success
= decode_DAS_ModifyEntryArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_me
= *dr
; /* struct copy */
struct ds_modifyrdn_arg
* dr
;
success
= decode_DAS_ModifyRDNArgument(pe
,1,NULLIP
,NULLVP
,&dr
);
arg
->arg_mr
= *dr
; /* struct copy */
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("DapDecodeInvoke: op id %d unknown!", rox
->rox_op
));
DRejectRequest (sd
, ROS_IP_UNRECOG
, rox
->rox_id
);
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "Unknown operation identifier"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DapDecodeInvoke: Unable to parse argument"));
DRejectRequest (sd
, ROS_IP_MISTYPED
, rox
->rox_id
);
return (dsapreject (di
, DP_INVOKE
, -1, NULLCP
, "Undecodable argument"));
charg
->cha_originator
= NULLDN
;
charg
->cha_target
= NULLDN
;
charg
->cha_domaininfo
= NULLPE
;
charg
->cha_trace
= NULLTRACEINFO
;
charg
->cha_timelimit
= NULLCP
;
int DspDecodeInvoke (sd
, rox
, di
)
struct RoSAPinvoke
* rox
;
struct DSAPindication
* di
;
di
->di_invoke
.dx_id
= rox
->rox_id
;
if (rox
-> rox_nolinked
== 0) {
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspDecodeInvoke: Linked operation (%d) %d",sd
,rox
-> rox_linkid
));
DRejectRequest (sd
, ROS_IP_LINKED
, rox
->rox_id
);
return (dsapreject (di
, DP_INVOKE
, -1, NULLCP
, "Link op"));
success
= decode_DO_ChainedReadArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
success
= decode_DO_ChainedCompareArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
struct ds_abandon_arg
* ab
;
success
= decode_DAS_AbandonArgument(pe
,1,NULLIP
,NULLVP
,&ab
);
di
->di_invoke
.dx_arg
.dca_dsarg
.arg_ab
= *ab
; /* struct copy */
success
= decode_DO_ChainedListArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
success
= decode_DO_ChainedSearchArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
success
= decode_DO_ChainedAddEntryArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
success
= decode_DO_ChainedRemoveEntryArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
success
= decode_DO_ChainedModifyEntryArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
success
= decode_DO_ChainedModifyRDNArgument(pe
,1,NULLIP
,NULLVP
,&da
);
di
->di_invoke
.dx_arg
= *da
; /* struct copy */
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("DspDecodeInvoke: op id %d unknown!", rox
->rox_op
));
DRejectRequest (sd
, ROS_IP_UNRECOG
, rox
->rox_id
);
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "Unknown operation identifier"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspDecodeInvoke: Unable to parse argument"));
DRejectRequest (sd
, ROS_IP_MISTYPED
, rox
->rox_id
);
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "Undecodable argument"));
di
->di_invoke
.dx_arg
.dca_dsarg
.arg_type
= rox
->rox_op
;
int DspDecodeResult (sd
, ror
, di
)
struct RoSAPresult
* ror
;
struct DSAPindication
* di
;
di
->di_result
.dr_id
= ror
->ror_id
;
success
= decode_DO_ChainedReadResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
success
= decode_DO_ChainedCompareResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
success
= decode_DAS_AbandonResult(pe
,1,NULLIP
,NULLVP
,&op
);
success
= decode_DO_ChainedListResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
success
= decode_DO_ChainedSearchResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
success
= decode_DO_ChainedAddEntryResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
success
= decode_DO_ChainedRemoveEntryResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
success
= decode_DO_ChainedModifyEntryResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
success
= decode_DO_ChainedModifyRDNResult(pe
,1,NULLIP
,NULLVP
,&op
);
di
->di_result
.dr_res
= *op
; /* struct copy */
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("DspDecodeResult: op id %d unknown!", ror
->ror_op
));
DRejectRequest (sd
, ROS_RRP_UNRECOG
, ror
->ror_id
);
return (dsaplose (di
, DP_RESULT
, NULLCP
, "Unknown operation identifier"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DspDecodeResult: Unable to parse argument"));
DRejectRequest (sd
, ROS_RRP_MISTYPED
, ror
->ror_id
);
return (dsaplose (di
, DP_RESULT
, NULLCP
, "Undecodable argument"));
di
->di_result
.dr_res
.dcr_dsres
.result_type
= ror
->ror_op
;
int QspDecodeInvoke (sd
, rox
, di
)
struct RoSAPinvoke
* rox
;
struct DSAPindication
* di
;
if (rox
-> rox_nolinked
== 0) {
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspDecodeInvoke: Linked operation (%d) %d",sd
,rox
-> rox_linkid
));
DRejectRequest (sd
, ROS_IP_LINKED
, rox
->rox_id
);
return (dsapreject (di
, DP_INVOKE
, -1, NULLCP
, "Link op"));
di
->di_invoke
.dx_id
= rox
->rox_id
;
success
= decode_DO_ChainedReadArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
success
= decode_DO_ChainedCompareArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
struct ds_abandon_arg
*arg
;
success
= decode_DAS_AbandonArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
.dca_dsarg
.arg_ab
= *arg
; /* struct copy */
success
= decode_DO_ChainedListArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
success
= decode_DO_ChainedSearchArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
success
= decode_DO_ChainedAddEntryArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
success
= decode_DO_ChainedRemoveEntryArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
success
= decode_DO_ChainedModifyEntryArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
success
= decode_DO_ChainedModifyRDNArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
= *arg
; /* struct copy */
success
= decode_Quipu_GetEntryDataBlockArgument(pe
,1,NULLIP
,NULLVP
,&arg
);
di
->di_invoke
.dx_arg
.dca_dsarg
.arg_ge
= *arg
; /* struct copy */
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("QspDecodeInvoke: op id %d unknown!", rox
->rox_op
));
DRejectRequest (sd
, ROS_IP_UNRECOG
, rox
->rox_id
);
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "Unknown operation identifier"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspDecodeInvoke: Unable to parse argument"));
DRejectRequest (sd
, ROS_IP_MISTYPED
, rox
->rox_id
);
return (dsaplose (di
, DP_INVOKE
, NULLCP
, "Undecodable argument"));
di
->di_invoke
.dx_arg
.dca_dsarg
.arg_type
= rox
->rox_op
;
int QspDecodeResult (sd
, ror
, di
)
struct RoSAPresult
* ror
;
struct DSAPindication
* di
;
di
->di_result
.dr_id
= ror
->ror_id
;
success
= decode_DO_ChainedReadResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
success
= decode_DO_ChainedCompareResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
success
= decode_DAS_AbandonResult(pe
,1,NULLIP
,NULLVP
,&res
);
/* NO result to copy !!! */
success
= decode_DO_ChainedListResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
success
= decode_DO_ChainedSearchResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
success
= decode_DO_ChainedAddEntryResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
success
= decode_DO_ChainedRemoveEntryResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
success
= decode_DO_ChainedModifyEntryResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
success
= decode_DO_ChainedModifyRDNResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
= *res
; /* sturct copy */
struct getedb_result
*res
;
success
= decode_Quipu_GetEntryDataBlockResult(pe
,1,NULLIP
,NULLVP
,&res
);
di
->di_result
.dr_res
.dcr_dsres
.res_ge
= *res
; /* sturct copy */
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("QspDecodeResult: op id %d unknown!", ror
->ror_op
));
DRejectRequest (sd
, ROS_RRP_UNRECOG
, ror
->ror_id
);
return (dsaplose (di
, DP_RESULT
, NULLCP
, "Unknown operation identifier"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("QspDecodeResult: Unable to parse argument"));
DRejectRequest (sd
, ROS_RRP_MISTYPED
, ror
->ror_id
);
return (dsaplose (di
, DP_RESULT
, NULLCP
, "Undecodable argument"));
di
->di_result
.dr_res
.dcr_dsres
.result_type
= ror
->ror_op
;
int DDecodeError (sd
, roe
, di
)
struct DSAPindication
* di
;
struct DSError
* err
= &(di
->di_error
.de_err
);
pdu_dump (pe
,DUMP_ERR
,roe
->roe_id
);
di
->di_error
.de_id
= roe
->roe_id
;
switch(err
->dse_type
= roe
->roe_error
)
case DSE_ABANDON_FAILED
:
struct DSE_abandon_fail
* de
;
success
= decode_DAS_AbandonFailedParm(pe
,1,NULLIP
,NULLVP
,&de
);
err
->dse_un
.dse_un_abandon_fail
= *de
; /* struct copy */
case DSE_ATTRIBUTEERROR
:
struct DSE_attribute
* de
;
success
= decode_DAS_AttributeErrorParm(pe
,1,NULLIP
,NULLVP
,&de
);
err
->dse_un
.dse_un_attribute
= *de
; /* struct copy */
success
= decode_DAS_NameErrorParm(pe
,1,NULLIP
,NULLVP
,&de
);
err
->dse_un
.dse_un_name
= *de
; /* struct copy */
struct DSE_referral
* de
;
success
= decode_DAS_ReferralParm(pe
,1,NULLIP
,NULLVP
,&de
);
err
->dse_un
.dse_un_referral
= *de
; /* struct copy */
struct DSE_security
* de
;
success
= decode_DAS_SecurityErrorParm(pe
,1,NULLIP
,NULLVP
,&de
);
err
->dse_un
.dse_un_security
= *de
; /* struct copy */
success
= decode_DAS_ServiceErrorParm(pe
,1,NULLIP
,NULLVP
,&de
);
err
->dse_un
.dse_un_service
= *de
; /* struct copy */
success
= decode_DAS_UpdateErrorParm(pe
,1,NULLIP
,NULLVP
,&de
);
err
->dse_un
.dse_un_update
= *de
; /* struct copy */
success
= ((pe
== NULLPE
) ? OK
: NOTOK
);
struct DSE_referral
* de
;
success
= decode_DO_DSAReferralParm(pe
, 1, NULLIP
, NULLVP
, &de
);
err
->dse_un
.dse_un_referral
= *de
; /* struct copy */
LLOG(log_dsap
, LLOG_EXCEPTIONS
, ("DDecodeError: op id %d unknown!", roe
->roe_error
));
DRejectRequest (sd
, ROS_REP_UNRECOG
, roe
->roe_id
);
return (dsaplose (di
, DP_ERROR
, NULLCP
, "Unknown operation identifier"));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("DDecodeError: Unable to parse argument"));
DRejectRequest (sd
, ROS_RRP_MISTYPED
, roe
->roe_id
);
return (dsaplose (di
, DP_ERROR
, NULLCP
, "Undecodable argument"));
int DDecodeUnbind (sd
, acf
, di
)
struct AcSAPfinish
* acf
;
struct DSAPindication
* di
;
struct RoNOTindication rni_s
;
struct RoNOTindication
* rni
= &(rni_s
);
watch_dog("RoUnBindInit");
if (RoUnBindInit (acf
, rni
) != OK
) {
return (ronot2dsaplose (di
, "RoUnBindInit", rni
));
LLOG (log_dsap
, LLOG_EXCEPTIONS
, ("Unbind has argument present! sd=%d", sd
));
di
->di_finish
.df_reason
= acf
->acf_reason
;
IFP restart_fn
= NULLIFP
;
static char * watch_dog_where
;
static SFD
watch_dog_activate ()
static char called
= FALSE
;
if (restart_fn
== NULLIFP
)
LLOG (log_dsap
, LLOG_FATAL
, ("Watchdog activated in %s", watch_dog_where
));
LLOG (log_dsap
, LLOG_FATAL
, ("Repeated lower level blocking in %s", watch_dog_where
));
A simple timer to stop DSAs holding onto associations, due to
(void) signal (SIGALRM
, watch_dog_activate
);
(void) alarm (watchdog_time
);
watch_dog_aux (where
,secs
)
(void) signal (SIGALRM
, watch_dog_activate
);
(void) signal (SIGALRM
, SIG_IGN
);
(void) alarm ((unsigned) 0);