|
|
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: 3843 (0xf03)
Types: TextFile
Names: »dsres_dec.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.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 7.0 89/11/23 21:50:37 mrose Rel $";
#endif
/*
* $Header: /f/osi/dsap/x500as/RCS/dsres_dec.c,v 7.0 89/11/23 21:50:37 mrose Rel $
*
*
* $Log: dsres_dec.c,v $
* Revision 7.0 89/11/23 21:50:37 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 decode_OPResult(ctx, pe, type, res)
int ctx;
PE pe;
int type;
struct ds_op_res *res;
{
int success;
if(ctx == CN_CTX_X500_DAP)
{
success = decode_DAPResult(pe, type, &(res->dcr_dsres));
}
else
{
success = decode_DSPResult(pe, type, res);
}
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;
#ifdef REMOVE_FOR_6_0
case OP_GETEDB :
success = decode_Quipu_GetEntryDataBlockResult(pe,1,NULLIP,NULLVP,&(res->res_ge));
break;
#endif
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;
case OP_GETEDB :
success = decode_Quipu_GetEntryDataBlockResult(pe,1,NULLIP,NULLVP,&(res->dcr_dsres.res_ge));
break;
default :
success = NOTOK;
res->dcr_dsres.result_type = 0;
LLOG(log_dsap, LLOG_EXCEPTIONS, ("decode_DSPRes unknown op %d", type));
break;
}
return(success);
}