|
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: 4052 (0xfd4) Types: TextFile Names: »dsres_enc.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.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 7.0 89/11/23 21:50:38 mrose Rel $"; #endif /* * $Header: /f/osi/dsap/x500as/RCS/dsres_enc.c,v 7.0 89/11/23 21:50:38 mrose Rel $ * * * $Log: dsres_enc.c,v $ * Revision 7.0 89/11/23 21:50:38 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" #include "quipu/dsargument.h" extern LLog * log_dsap; int encode_OPResult(ctx, pep, typep, res) int ctx; PE *pep; int *typep; struct ds_op_res *res; { int success; if(ctx == CN_CTX_X500_DAP) { success = encode_DAPResult(pep, typep, &(res->dcr_dsres)); } else { success = encode_DSPResult(pep, typep, res); } 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 : merge_search_results (&res->res_sr,res->res_sr.srr_next); 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; #ifdef REMOVE_FOR_6_0 case OP_GETEDB : success = encode_Quipu_GetEntryDataBlockResult(pep,0,0,NULLCP,&(res->res_ge)); break; #endif 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 : merge_search_results (&res->dcr_dsres.res_sr,res->dcr_dsres.res_sr.srr_next); 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; case OP_GETEDB : success = encode_Quipu_GetEntryDataBlockResult(pep,0,0,NULLCP,&(res->dcr_dsres.res_ge)); break; default: success = NOTOK; (*typep) = 0; LLOG(log_dsap, LLOG_EXCEPTIONS, ("encode_DSPRes unknown type %d", res->dcr_dsres.result_type)); break; } return(success); }