|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T d
Length: 3744 (0xea0) Types: TextFile Names: »dsres_enc.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/dsap/x500as/dsres_enc.c«
/* dsres_enc.c - ds response encoder */ #ifndef lint static char *rcsid = "$Header: /f/osi/dsap/x500as/RCS/dsres_enc.c,v 6.0 89/03/18 23:29:48 mrose Rel $"; #endif /* * $Header: /f/osi/dsap/x500as/RCS/dsres_enc.c,v 6.0 89/03/18 23:29:48 mrose Rel $ * * * $Log: dsres_enc.c,v $ * Revision 6.0 89/03/18 23:29:48 mrose * Release 5.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" #include "quipu/dsargument.h" extern LLog * log_dsap; int encode_OPResult(dsp, pep, typep, res) int dsp; PE *pep; int *typep; struct ds_op_res *res; { int success; if(dsp) { success = encode_DSPResult(pep, typep, res); } else { success = encode_DAPResult(pep, typep, &(res->dcr_dsres)); } return(success); } int encode_DAPResult(pep,typep,res) PE * pep; int * typep; struct DSResult *res; { int success; DLOG(log_dsap, LLOG_TRACE, ("encode_DAPResult()")); switch(*typep = res->result_type) { case OP_READ : success = encode_DAS_ReadResult(pep,0,0,NULLCP,&(res->res_rd)); break; case OP_COMPARE : success = encode_DAS_CompareResult(pep,0,0,NULLCP,&(res->res_cm)); break; case OP_ABANDON : success = encode_DAS_AbandonResult(pep,0,0,NULLCP,NULLCP); break; case OP_LIST : success = encode_DAS_ListResult(pep,0,0,NULLCP,&(res->res_ls)); break; case OP_SEARCH : success = encode_DAS_SearchResult(pep,0,0,NULLCP,&(res->res_sr)); break; case OP_ADDENTRY : success = encode_DAS_AddEntryResult(pep,0,0,NULLCP,NULLCP); break; case OP_REMOVEENTRY : success = encode_DAS_RemoveEntryResult(pep,0,0,NULLCP,NULLCP); break; case OP_MODIFYENTRY : success = encode_DAS_ModifyEntryResult(pep,0,0,NULLCP,NULLCP); break; case OP_MODIFYRDN : success = encode_DAS_ModifyRDNResult(pep,0,0,NULLCP,NULLCP); break; case OP_GETEDB : success = encode_Quipu_GetEntryDataBlockResult(pep,0,0,NULLCP,&(res->res_ge)); break; default: success = NOTOK; (*typep) = 0; LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_DAPRes unknown type %d", res->result_type)); break; } return(success); } int encode_DSPResult(pep,typep,res) PE *pep; int *typep; struct ds_op_res *res; { int success; DLOG(log_dsap, LLOG_TRACE, ("encode_DSPResult()")); switch(*typep = res->dcr_dsres.result_type) { case OP_READ : success = encode_DO_ChainedReadResult(pep,0,0,NULLCP,res); break; case OP_COMPARE : success = encode_DO_ChainedCompareResult(pep,0,0,NULLCP,res); break; case OP_ABANDON : success = encode_DAS_AbandonResult(pep,0,0,NULLCP,NULLCP); break; case OP_LIST : success = encode_DO_ChainedListResult(pep,0,0,NULLCP,res); break; case OP_SEARCH : success = encode_DO_ChainedSearchResult(pep,0,0,NULLCP,res); break; case OP_ADDENTRY : success = encode_DO_ChainedAddEntryResult(pep,0,0,NULLCP,res); break; case OP_REMOVEENTRY : success = encode_DO_ChainedRemoveEntryResult(pep,0,0,NULLCP,res); break; case OP_MODIFYENTRY : success = encode_DO_ChainedModifyEntryResult(pep,0,0,NULLCP,res); break; case OP_MODIFYRDN : success = encode_DO_ChainedModifyRDNResult(pep,0,0,NULLCP,res); break; default: success = NOTOK; (*typep) = 0; LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_DSPRes unknown type %d", res->dcr_dsres.result_type)); break; } return(success); }