|
|
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: 2893 (0xb4d)
Types: TextFile
Names: »oper_invoke.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/quipu/oper_invoke.c«
/* oper_invoke.c - encode argument and invoke operation */
#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/oper_invoke.c,v 7.0 89/11/23 22:17:52 mrose Rel $";
#endif
/*
* $Header: /f/osi/quipu/RCS/oper_invoke.c,v 7.0 89/11/23 22:17:52 mrose Rel $
*
*
* $Log: oper_invoke.c,v $
* Revision 7.0 89/11/23 22:17:52 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;
#ifndef NO_STATS
extern LLog * log_stat;
#endif
void ros_log ();
oper_send_invoke(oper)
register struct oper_act * oper;
{
PE arg_pe;
int arg_type;
struct RoSAPindication roi_s;
struct RoSAPindication *roi = &roi_s;
struct RoSAPpreject *rop = &(roi->roi_preject);
DLOG(log_dsap, LLOG_TRACE, ("oper_send_invoke"));
if(oper == NULLOPER)
{
LLOG(log_dsap, LLOG_FATAL, ("Task memerr 3"));
return(NOTOK);
}
if(oper->on_state == ON_ABANDONED)
return NOTOK;
/*
* Attempt to encode argument.
*/
if(encode_OPArgument(oper->on_conn->cn_ctx, &arg_pe, &arg_type,
oper->on_arg) == OK)
{
/*
* Genrate an id unique over this connection for this operation.
*/
oper->on_id = ++(oper->on_conn->cn_op_id);
/*
* RO-INVOKE.REQUEST
*/
watch_dog("RoInvokeRequest");
if(RoInvokeRequest(oper->on_conn->cn_ad, arg_type,
ROS_ASYNC, arg_pe, oper->on_id,
NULLIP, ROS_NOPRIO, roi) == OK)
{
watch_dog_reset();
DLOG(log_dsap, LLOG_NOTICE, ("RO-INVOKE.REQUEST: OK"));
#ifndef NO_STATS
LLOG(log_stat, LLOG_TRACE, ("Chain (%d)",oper->on_conn->cn_ad));
#endif
oper->on_state = ON_CHAINED;
pe_free(arg_pe);
return(OK);
}
else
{
watch_dog_reset();
ros_log(rop, "RO-INVOKE.REQUEST");
if(ROS_FATAL(rop->rop_reason) || (rop->rop_reason == ROS_PARAMETER))
{
struct connection * cn;
LLOG(log_dsap, LLOG_FATAL, ("RoInvoke fatal PReject - fail the connection"));
pe_free(arg_pe);
oper->on_conn->cn_state = CN_FAILED;
cn = oper->on_conn;
oper_extract(oper);
conn_extract(cn);
return(NOTOK);
}
oper->on_state = ON_COMPLETE;
oper->on_type = ACT_TYPE_RESP;
oper->on_resp.resp_type = RESP_TYPE_REJ;
oper_fail_wakeup(oper);
return(NOTOK);
}
}
else
{
LLOG(log_dsap, LLOG_EXCEPTIONS, ("Couldn't encode argument."));
oper->on_state = ON_COMPLETE;
oper->on_type = ACT_TYPE_RESP;
oper->on_resp.resp_type = RESP_TYPE_REJ;
oper_fail_wakeup(oper);
return(NOTOK);
}
}