|
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: 3669 (0xe55) Types: TextFile Names: »dsres_dec.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/dsap/x500as/dsres_dec.c«
/* dsres_dec.c - ds response decoder */ #ifndef lint static char *rcsid = "$Header: /f/osi/dsap/x500as/RCS/dsres_dec.c,v 6.0 89/03/18 23:29:47 mrose Rel $"; #endif /* * $Header: /f/osi/dsap/x500as/RCS/dsres_dec.c,v 6.0 89/03/18 23:29:47 mrose Rel $ * * * $Log: dsres_dec.c,v $ * Revision 6.0 89/03/18 23:29:47 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 decode_OPResult(dsp, pe, type, res) int dsp; PE pe; int type; struct ds_op_res *res; { int success; if(dsp) { success = decode_DSPResult(pe, type, res); } else { success = decode_DAPResult(pe, type, &(res->dcr_dsres)); } return(success); } int decode_DAPResult(pe,type,res) PE pe; int type; struct DSResult *res; { int success; switch(res->result_type = type) { case OP_READ : success = decode_DAS_ReadResult(pe,1,NULLIP,NULLVP,&(res->res_rd)); break; case OP_COMPARE : success = decode_DAS_CompareResult(pe,1,NULLIP,NULLVP,&(res->res_cm)); break; case OP_ABANDON : success = decode_DAS_AbandonResult(pe,1,NULLIP,NULLVP,NULLCP); break; case OP_LIST : success = decode_DAS_ListResult(pe,1,NULLIP,NULLVP,&(res->res_ls)); break; case OP_SEARCH : success = decode_DAS_SearchResult(pe,1,NULLIP,NULLVP,&(res->res_sr)); break; case OP_ADDENTRY : success = decode_DAS_AddEntryResult(pe,1,NULLIP,NULLVP,NULLCP); break; case OP_REMOVEENTRY : success = decode_DAS_RemoveEntryResult(pe,1,NULLIP,NULLVP,NULLCP); break; case OP_MODIFYENTRY : success = decode_DAS_ModifyEntryResult(pe,1,NULLIP,NULLVP,NULLCP); break; case OP_MODIFYRDN : success = decode_DAS_ModifyRDNResult(pe,1,NULLIP,NULLVP,NULLCP); break; case OP_GETEDB : success = decode_Quipu_GetEntryDataBlockResult(pe,1,NULLIP,NULLVP,&(res->res_ge)); break; default : success = NOTOK; res->result_type = 0; LLOG(log_dsap, LLOG_EXCEPTIONS, ("decode_DSPRes unknown op %d", type)); break; } return(success); } int decode_DSPResult(pe,type,res) PE pe; int type; struct ds_op_res *res; { int success; switch(res->dcr_dsres.result_type = type) { case OP_READ : success = decode_DO_ChainedReadResult(pe,1,NULLIP,NULLVP,res); break; case OP_COMPARE : success = decode_DO_ChainedCompareResult(pe,1,NULLIP,NULLVP,res); break; case OP_ABANDON : success = decode_DAS_AbandonResult(pe,1,NULLIP,NULLVP,NULLCP); break; case OP_LIST : success = decode_DO_ChainedListResult(pe,1,NULLIP,NULLVP,res); break; case OP_SEARCH : success = decode_DO_ChainedSearchResult(pe,1,NULLIP,NULLVP,res); break; case OP_ADDENTRY : success = decode_DO_ChainedAddEntryResult(pe,1,NULLIP,NULLVP,res); break; case OP_REMOVEENTRY : success = decode_DO_ChainedRemoveEntryResult(pe,1,NULLIP,NULLVP,res); break; case OP_MODIFYENTRY : success = decode_DO_ChainedModifyEntryResult(pe,1,NULLIP,NULLVP,res); break; case OP_MODIFYRDN : success = decode_DO_ChainedModifyRDNResult(pe,1,NULLIP,NULLVP,res); break; default : success = NOTOK; res->dcr_dsres.result_type = 0; LLOG(log_dsap, LLOG_EXCEPTIONS, ("decode_DSPRes unknown op %d", type)); break; } return(success); }