|
|
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 t
Length: 2998 (0xbb6)
Types: TextFile
Names: »task_error.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/quipu/task_error.c«
/* task_error.c - */
#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/task_error.c,v 7.0 89/11/23 22:18:12 mrose Rel $";
#endif
/*
* $Header: /f/osi/quipu/RCS/task_error.c,v 7.0 89/11/23 22:18:12 mrose Rel $
*
*
* $Log: task_error.c,v $
* Revision 7.0 89/11/23 22:18:12 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;
void ros_log ();
/*
* The DSA has produced an error for the task, encode the error,
* generate an RO-ERROR.REQUEST and update the task block.
*/
task_error(task)
register struct task_act * task;
{
struct connection * cn = task->tk_conn;
PE err_pe;
int err_type;
struct RoSAPindication roi_s;
struct RoSAPindication *roi = &roi_s;
struct RoSAPpreject *rop = &(roi->roi_preject);
struct DSError * err;
#ifndef NO_STATS
extern LLog * log_stat;
LLOG (log_stat, LLOG_TRACE,("Error sent (%d)",task->tk_conn->cn_ad));
#endif
DLOG(log_dsap, LLOG_TRACE, ("task_error"));
if(task == NULLTASK)
{
LLOG(log_dsap, LLOG_FATAL, ("Task memerr 2"));
return;
}
err = task->tk_error;
/* Return the right sort of referral error */
if(cn->cn_ctx == CN_CTX_X500_DAP)
{
if(err->dse_type == DSE_DSAREFERRAL)
{
LLOG(log_dsap, LLOG_TRACE, ("Changing DSAREFERRAL to REFERRAL (DAP)"));
err->dse_type = DSE_REFERRAL;
}
}
else
{
if(err->dse_type == DSE_REFERRAL)
{
LLOG(log_dsap, LLOG_TRACE, ("Changing DSAREFERRAL to REFERRAL"));
err->dse_type = DSE_DSAREFERRAL;
}
}
if(encode_OPError(&err_pe, &err_type, err) == OK)
{
/* PLOG (log_dsap, print_OPError, &err_pe, "Operation Error", 0); */
watch_dog("RoErrorRequest");
if(RoErrorRequest(cn->cn_ad, task->tk_id, err_type,
err_pe, ROS_NOPRIO, roi) == NOTOK)
{
watch_dog_reset();
ros_log(rop, "RO-ERROR.REQUEST");
if(ROS_FATAL(rop->rop_reason) || (rop->rop_reason == ROS_PARAMETER))
{
LLOG(log_dsap, LLOG_FATAL, ("RoError fatal PReject - fail the connection"));
cn->cn_state = CN_FAILED;
}
} else
watch_dog_reset();
if(err_pe != NULLPE)
pe_free(err_pe);
}
else
{
LLOG(log_dsap, LLOG_EXCEPTIONS, ("Couldn't encode error."));
/*
* None of the available rejects fit the problem,
* the only plausible response is ROS_IP_RELEASE (a lie)
* without then releasing.
*/
send_ro_ureject(cn->cn_ad, &(task->tk_id), ROS_IP_RELEASE);
}
if(cn->cn_state == CN_FAILED)
{
DLOG(log_dsap, LLOG_DEBUG, ("NOT extracting conn:"));
conn_log(cn);
/*
conn_extract(cn);
*/
}
}