|
|
BSD 4.3reno
/* dserr_enc.c - ds error encoder */
#ifndef lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/dsap/x500as/dserr_enc.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $";
#endif
/*
* $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/dsap/x500as/dserr_enc.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
*
*
* $Log: dserr_enc.c,v $
* Revision 1.1.1.1 2018/04/24 16:12:56 root
* BSD 4.3reno
*
* Revision 7.0 89/11/23 21:50: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 "psap.h"
#include "quipu/util.h"
#include "quipu/common.h"
extern LLog * log_dsap;
int encode_OPError(pep, typep, err)
PE *pep;
int *typep;
struct DSError *err;
{
int success;
switch(*typep = err->dse_type)
{
case DSE_NOERROR :
LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_error called with no error"));
(*pep) = NULLPE;
success = NOTOK;
break;
case DSE_ABANDON_FAILED :
success = encode_DAS_AbandonFailedParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_abandon_fail));
break;
case DSE_ATTRIBUTEERROR :
success = encode_DAS_AttributeErrorParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_attribute));
break;
case DSE_NAMEERROR :
success = encode_DAS_NameErrorParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_name));
break;
case DSE_REFERRAL :
success = encode_DAS_ReferralParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_referral));
break;
case DSE_SECURITYERROR :
success = encode_DAS_SecurityErrorParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_security));
break;
case DSE_SERVICEERROR :
success = encode_DAS_ServiceErrorParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_service));
break;
case DSE_UPDATEERROR :
success = encode_DAS_UpdateErrorParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_update));
break;
case DSE_ABANDONED :
(*pep) = NULLPE;
success = OK;
break;
case DSE_DSAREFERRAL :
success = encode_DO_DSAReferralParm(pep,0,0,NULLCP,&(err->dse_un.dse_un_referral));
break;
default :
(*pep) = NULLPE;
success = NOTOK;
LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_OPError unknown error %d", err->dse_type));
break;
}
return(success);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.