|
|
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 o
Length: 4112 (0x1010)
Types: TextFile
Names: »oper_result.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/quipu/oper_result.c«
/* oper_result.c - deal with result of an operation */
#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/oper_result.c,v 7.0 89/11/23 22:17:54 mrose Rel $";
#endif
/*
* $Header: /f/osi/quipu/RCS/oper_result.c,v 7.0 89/11/23 22:17:54 mrose Rel $
*
*
* $Log: oper_result.c,v $
* Revision 7.0 89/11/23 22:17:54 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 "rosap.h"
#include "quipu/util.h"
#include "quipu/connection.h"
extern LLog * log_dsap;
extern int dn_print();
oper_result(cn, ror)
Conn cn;
struct RoSAPresult *ror;
{
struct oper_act * on;
DLOG(log_dsap, LLOG_TRACE, ("oper_result()"));
for(on=cn->cn_operlist; on != NULLOPER; on=on->on_next_conn)
{
if(on->on_id == ror->ror_id)
break;
}
if(on == NULLOPER)
{
LLOG(log_dsap, LLOG_FATAL, ("Task memerr 10"));
send_ro_ureject(cn->cn_ad, &(ror->ror_id), ROS_RRP_UNRECOG);
return;
}
if(on->on_state == ON_ABANDONED)
{
LLOG(log_dsap, LLOG_NOTICE, ("oper_result - operation had been abandoned"));
oper_extract(on);
return;
}
switch(on->on_type)
{
case ON_TYPE_X500:
if(ds_recog_op(ror->ror_op))
{
if(decode_OPResult(on->on_conn->cn_ctx, ror->ror_result, ror->ror_op,
&(on->on_resp.resp_res)) == OK)
{
task_result_wakeup(on);
}
else
{
task_fail_wakeup(on);
}
}
else
{
send_ro_ureject(on->on_conn->cn_ad, &(ror->ror_id), ROS_RRP_MISTYPED);
}
break;
case ON_TYPE_SUBTASK:
if(ds_recog_op(ror->ror_op))
{
if(decode_OPResult(on->on_conn->cn_ctx, ror->ror_result, ror->ror_op,
&(on->on_resp.resp_res)) == OK)
{
subtask_result_wakeup(on);
}
else
{
subtask_fail_wakeup(on);
}
}
else
{
send_ro_ureject(on->on_conn->cn_ad, &(ror->ror_id), ROS_RRP_MISTYPED);
}
break;
case ON_TYPE_BIND_COMPARE:
if(ror->ror_op == OP_COMPARE)
{
if(decode_OPResult(on->on_conn->cn_ctx, ror->ror_result,
ror->ror_op, &(on->on_resp.resp_res)) == OK)
{
bind_compare_result_wakeup(on);
}
else
{
LLOG(log_dsap, LLOG_EXCEPTIONS, ("Undecodable get_dsa_info result"));
bind_compare_fail_wakeup(on);
}
}
else
{
send_ro_ureject(on->on_conn->cn_ad, &(ror->ror_id), ROS_RRP_MISTYPED);
}
break;
case ON_TYPE_GET_DSA_INFO:
if(ror->ror_op == OP_READ)
{
if(decode_OPResult(on->on_conn->cn_ctx, ror->ror_result,
ror->ror_op, &(on->on_resp.resp_res)) == OK)
{
dsa_info_result_wakeup(on);
}
else
{
LLOG(log_dsap, LLOG_EXCEPTIONS, ("Undecodable get_dsa_info result"));
dsa_info_fail_wakeup(on);
}
}
else
{
send_ro_ureject(on->on_conn->cn_ad, &(ror->ror_id), ROS_RRP_MISTYPED);
}
break;
case ON_TYPE_GET_EDB:
if(ror->ror_op == OP_GETEDB)
{
if(decode_Quipu_GetEntryDataBlockResult(ror->ror_result, 1, NULLIP, NULLVP,
&(on->on_resp.resp_res.dcr_dsres.res_ge)) == OK)
{
on->on_state = ON_COMPLETE;
}
else
{
pslog (log_dsap,LLOG_EXCEPTIONS,"Undecodable getedb result for",dn_print,(caddr_t)on->on_req.dca_dsarg.arg_ge.ga_entry);
get_edb_extract(on);
op_arg_free (&on->on_req);
oper_conn_extract(on);
oper_free(on);
}
}
else
{
send_ro_ureject(on->on_conn->cn_ad, &(ror->ror_id), ROS_RRP_MISTYPED);
}
break;
case ON_TYPE_NAMESERVICE:
if(ror->ror_op == OP_READ)
{
if(decode_OPResult(on->on_conn->cn_ctx, ror->ror_result,
ror->ror_op, &(on->on_resp.resp_res)) == OK)
{
nameservice_result_wakeup(on);
}
else
{
LLOG(log_dsap, LLOG_EXCEPTIONS, ("Undecodable get_dsa_info result"));
nameservice_fail_wakeup(on);
}
}
else
{
send_ro_ureject(on->on_conn->cn_ad, &(ror->ror_id), ROS_RRP_MISTYPED);
}
break;
default:
LLOG(log_dsap, LLOG_EXCEPTIONS, ("operation of unknown type"));
oper_extract(on);
break;
}
}