|
|
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 n
Length: 4059 (0xfdb)
Types: TextFile
Names: »nw_ro_invoke.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/dsap/net/nw_ro_invoke.c«
/* nw_ro_invoke.c - */
#ifndef lint
static char *rcsid = "$Header: /f/osi/dsap/net/RCS/nw_ro_invoke.c,v 6.0 89/03/18 23:28:52 mrose Rel $";
#endif
/*
* $Header: /f/osi/dsap/net/RCS/nw_ro_invoke.c,v 6.0 89/03/18 23:28:52 mrose Rel $
*
*
* $Log: nw_ro_invoke.c,v $
* Revision 6.0 89/03/18 23:28:52 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 "rosap.h"
#include "quipu/util.h"
#include "quipu/connection.h"
extern LLog * log_dsap;
struct activity * task_alloc();
struct common_args * get_ca_ref();
net_wait_ro_invoke(conn, rox)
register struct connection * conn;
register struct RoSAPinvoke * rox;
{
struct activity * task;
DLOG(log_dsap, LLOG_TRACE, ("net_wait_ro_invoke"));
for(task=conn->cn_tasklist; task!=NULLACTIVITY; task=task->tk_next)
if(task->act_id == rox->rox_id)
break;
if(task == NULLACTIVITY)
{
if((ds_recog_op(rox->rox_op)) || (rox->rox_op == OP_GETEDB))
/*
if((ds_recog_op(rox->rox_op)) || ((rox->rox_op == OP_GETEDB) && quipu_as))
*/
{
task = task_alloc();
if(decode_OPArgument(conn->cn_dsa, rox->rox_args, rox->rox_op,
&(task->act_req)) == OK)
{
struct extension * ext;
DLOG(log_dsap, LLOG_TRACE, ("Operation Invoked"));
task->act_conn = conn;
task->tk_next = conn->cn_tasklist;
conn->cn_tasklist = task;
task->act_class = ACTIVITY_DSA_WORK;
task->act_type = ACT_TYPE_REQ;
task->act_id = rox->rox_id;
if((task->act_ca = get_ca_ref(&task->act_req)) != NULL_COMMONARG)
{
switch(task->act_ca->ca_servicecontrol.svc_prio)
{
case SVC_PRIO_LOW:
task->act_prio = DSA_PRIO_LOW;
break;
case SVC_PRIO_MED:
task->act_prio = DSA_PRIO_MED;
break;
case SVC_PRIO_HIGH:
task->act_prio = DSA_PRIO_HIGH;
break;
default:
LLOG(log_dsap, LLOG_EXCEPTIONS, ("Impossibly svc_prio = %d",
task->act_ca->ca_servicecontrol.svc_prio));
task->act_prio = DSA_PRIO_LOW;
break;
}
for(ext = task->act_ca->ca_extensions; ext!=NULLEXT; ext=ext->ext_next)
{
/* Check for unavailable critical extension */
if(ext->ext_critical)
break;
}
if(ext != NULLEXT)
{
task->act_class = ACTIVITY_NET_SEND;
task->act_type = ACT_TYPE_RESP;
task->act_resp.resp_type = RESP_TYPE_RET;
task->act_resp.ret_type = RET_TYPE_ERR;
task->act_resp.resp_err.dse_type = DSE_SERVICEERROR;
task->act_resp.resp_err.dse_un.dse_un_service.DSE_sv_problem = DSE_SV_UNAVAILABLECRITICALEXTENSION;
}
}
else
{
/* Either GetEDB or Abandon so high prio */
task->act_prio = DSA_PRIO_HIGH;
}
/* Check for loop */
if((task->act_type == ACT_TYPE_REQ) && (conn->cn_dsa) && (cha_loopdetected(task->act_cha)))
{
task->act_class = ACTIVITY_NET_SEND;
task->act_type = ACT_TYPE_RESP;
task->act_resp.resp_type = RESP_TYPE_RET;
task->act_resp.ret_type = RET_TYPE_ERR;
task->act_resp.resp_err.dse_type = DSE_SERVICEERROR;
task->act_resp.resp_err.dse_un.dse_un_service.DSE_sv_problem = DSE_SV_LOOPDETECT;
}
}
else
{
net_send_ro_ureject(conn->cn_ad, &(rox->rox_id), ROS_IP_MISTYPED);
/*
act_free(task);
Decoding does not produce structures safe to free when the decoder returns
NOTOK. The hack for now is to blank the task and let some memory snarl up.
*/
free((char *)task);
task = NULLACTIVITY;
}
}
else
{
DLOG(log_dsap, LLOG_TRACE, ("Unrecognized operation id %d", rox->rox_op));
net_send_ro_ureject(conn->cn_ad, &(rox->rox_id), ROS_IP_UNRECOG);
}
}
else
{
DLOG(log_dsap, LLOG_TRACE, ("Duplicate invocation identifier %d", rox->rox_id));
net_send_ro_ureject(conn->cn_ad, &(rox->rox_id), ROS_IP_DUP);
}
}