|
|
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: 2491 (0x9bb)
Types: TextFile
Names: »dsa_apply.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/quipu/dsa_apply.c«
/* dsa_apply.c - Map ROS operations to internal directory operations */
#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/dsa_apply.c,v 6.0 89/03/18 23:41:27 mrose Rel $";
#endif
/*
* $Header: /f/osi/quipu/RCS/dsa_apply.c,v 6.0 89/03/18 23:41:27 mrose Rel $
*
*
* $Log: dsa_apply.c,v $
* Revision 6.0 89/03/18 23:41:27 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.
*
*/
#include "quipu/util.h"
#include "quipu/common.h"
#include "quipu/dsargument.h"
extern LLog * log_dsap;
#ifndef NO_STATS
extern LLog * log_stat;
#endif
int dsa_apply(arg, err, res, orig, base, local, refer)
struct DSArgument *arg;
struct DSError *err;
struct DSResult *res;
DN orig;
DN base;
struct ds_search_task **local;
struct ds_search_task **refer;
{
int dsa_ret;
DLOG (log_dsap,LLOG_TRACE,( "Apply operation"));
switch(arg->arg_type)
{
case OP_READ:
dsa_ret = do_ds_read(&(arg->arg_rd), err, &(res->res_rd), orig, base);
break;
case OP_COMPARE:
dsa_ret = do_ds_compare(&(arg->arg_cm), err, &(res->res_cm), orig, base);
break;
case OP_ABANDON:
LLOG(log_dsap, LLOG_FATAL, ("Abandon being applied!"));
dsa_ret = do_ds_abandon(&(arg->arg_ab), err);
break;
case OP_LIST:
dsa_ret = do_ds_list(&(arg->arg_ls), err, &(res->res_ls), orig, base);
break;
case OP_SEARCH:
dsa_ret = do_ds_search(&(arg->arg_sr), err, &(res->res_sr), orig, base, local, refer);
break;
case OP_ADDENTRY:
dsa_ret = do_ds_addentry(&(arg->arg_ad), err, orig, base);
break;
case OP_REMOVEENTRY:
dsa_ret = do_ds_removeentry(&(arg->arg_rm), err, orig, base);
break;
case OP_MODIFYENTRY:
dsa_ret = do_ds_modifyentry(&(arg->arg_me), err, orig, base);
break;
case OP_MODIFYRDN:
dsa_ret = do_ds_modifyrdn(&(arg->arg_mr), err, orig, base);
break;
case OP_GETEDB:
dsa_ret = do_get_edb (&(arg->arg_ge), err, &(res->res_ge), orig);
break;
default:
LLOG (log_dsap,LLOG_EXCEPTIONS,( "Unknown operation type!"));
break;
}
#ifndef NO_STATS
if ((dsa_ret != DS_OK) && (dsa_ret != DS_CONTINUE))
LLOG (log_stat,LLOG_NOTICE,("Operation failed"));
#endif
return(dsa_ret);
}