File:  [CSRG BSD Unix] / 43BSDReno / contrib / isode-beta / dsap / x500as / dserr_dec.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

/* dserr_dec.c - ds error decoder */

#ifndef	lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/dsap/x500as/dserr_dec.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_dec.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
 *
 *
 * $Log: dserr_dec.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:34  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             decode_OPError(pe, type, err)
PE		pe;
int		type;
struct DSError  *err;
{
    int		success;

	switch(err->dse_type = type)
	{
	case    DSE_NOERROR :
		success = NOTOK;
		break;
	case    DSE_ABANDON_FAILED :
		success = decode_DAS_AbandonFailedParm(pe,1,NULLIP,NULLVP,&(err->dse_un.dse_un_abandon_fail));
		break;
	case    DSE_ATTRIBUTEERROR :
		success = decode_DAS_AttributeErrorParm(pe,1,NULLIP,NULLVP,&(err->dse_un.dse_un_attribute));
		break;
	case    DSE_NAMEERROR :
		success = decode_DAS_NameErrorParm(pe,1,NULLIP,NULLVP,&(err->dse_un.dse_un_name));
		break;
	case    DSE_REFERRAL :
		success = decode_DAS_ReferralParm(pe,1,NULLIP,NULLVP,&(err->dse_un.dse_un_referral));
		break;
	case    DSE_SECURITYERROR :
		success = decode_DAS_SecurityErrorParm(pe,1,NULLIP,NULLVP,&(err->dse_un.dse_un_security));
		break;
	case    DSE_SERVICEERROR :
		success = decode_DAS_ServiceErrorParm(pe,1,NULLIP,NULLVP,&(err->dse_un.dse_un_service));
		break;
	case    DSE_UPDATEERROR :
		success = decode_DAS_UpdateErrorParm(pe,1,NULLIP,NULLVP,&(err->dse_un.dse_un_update));
		break;
	case    DSE_ABANDONED :
		success = ((pe == NULLPE) ? OK : NOTOK);
		break;
	case	DSE_DSAREFERRAL :
		success = decode_DO_DSAReferralParm(pe, 1, NULLIP, NULLVP, &(err->dse_un.dse_un_referral));
		break;
	default :
		success = NOTOK;
		LLOG(log_dsap, LLOG_EXCEPTIONS, ("decode_OPError unknown Error %d", type));
		break;
	}

	return(success);
}


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.