DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T n

⟦8df38db2a⟧ TextFile

    Length: 2317 (0x90d)
    Types: TextFile
    Names: »ns_ro_error.c«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/dsap/net/ns_ro_error.c« 

TextFile

/* ns_ro_error.c - */

#ifndef lint
static char *rcsid = "$Header: /f/osi/dsap/net/RCS/ns_ro_error.c,v 6.0 89/03/18 23:28:44 mrose Rel $";
#endif

/*
 * $Header: /f/osi/dsap/net/RCS/ns_ro_error.c,v 6.0 89/03/18 23:28:44 mrose Rel $
 *
 *
 * $Log:	ns_ro_error.c,v $
 * Revision 6.0  89/03/18  23:28:44  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();
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.
*/
net_send_ro_error(task)
register        struct activity * task;
{
    PE                          err_pe;
    int                         err_type;
    struct RoSAPindication      roi_s;
    struct RoSAPindication      *roi = &roi_s;
    struct RoSAPpreject         *rop = &(roi->roi_preject);
    struct DSError              * err;

    DLOG(log_dsap, LLOG_TRACE, ("net_send_ro_error"));

    if(task == NULLACTIVITY)
    {
	LLOG(log_dsap, LLOG_FATAL, ("Task memerr 2"));
	return;
    }
    else
	err = task->act_error;

    /* Return the right sort of referral error */
    if(task->act_conn->cn_dsa)
    {
	if(err->dse_type == DSE_REFERRAL)
	    err->dse_type = DSE_DSAREFERRAL;
    }
    else
    {
	if(err->dse_type == DSE_DSAREFERRAL)
	    err->dse_type = DSE_REFERRAL;
    }

    if(encode_OPError(&err_pe, &err_type, err) == OK)
    {
	/* PLOG (log_dsap, print_OPError, &err_pe, "Operation Error", 0); */
	if(RoErrorRequest(task->act_conn->cn_ad, task->act_id, err_type,
	  err_pe, ROS_NOPRIO, roi) ==  NOTOK)
	{
	    ros_log(rop, "RO-ERROR.REQUEST");
	}
	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.
	*/
	net_send_ro_ureject(task->act_conn->cn_ad, &(task->act_id), ROS_IP_RELEASE);
    }
}