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 r

⟦cacf660c6⟧ TextFile

    Length: 2672 (0xa70)
    Types: TextFile
    Names: »rosapresult.c«

Derivation

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

TextFile

/* rosapresult.c - ROPM: result */

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

/* 
 * $Header: /f/osi/rosap/RCS/rosapresult.c,v 6.0 89/03/18 23:42:28 mrose Rel $
 *
 * Based on an TCP-based implementation by George Michaelson of University
 * College London.
 *
 *
 * $Log:	rosapresult.c,v $
 * Revision 6.0  89/03/18  23:42:28  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 <stdio.h>
#include <signal.h>
#include "ropkt.h"

/* \f

   RO-RESULT.REQUEST */

int	RoResultRequest (sd, invokeID, op, result, priority, roi)
int	sd;
int	invokeID,
	op,
	priority;
PE	result;
struct RoSAPindication *roi;
{
    SBV	    smask;
    int     status;
    register struct assocblk   *acb;

    missingP (roi);

    smask = sigioblock ();

    rosapPsig (acb, sd);

    status = RoResultRequestAux (acb, invokeID, op, result, priority, roi);

    (void) sigiomask (smask);

    return status;
}

/* \f

 */

static int  RoResultRequestAux (acb, invokeID, op, result, priority, roi)
register struct assocblk   *acb;
int	invokeID,
	op,
	priority;
PE	result;
struct RoSAPindication *roi;
{
    register PE	pe,
		p,
		q;

    if ((acb -> acb_flags & ACB_INIT) && (acb -> acb_flags & ACB_ROS))
	return rosaplose (roi, ROS_OPERATION, NULLCP, "not responder");
    if (!(acb -> acb_flags & ACB_ACS)) {
	missingP (result);
    }

    if (acb -> acb_ready
	    && !(acb -> acb_flags & ACB_TURN)
	    && (*acb -> acb_ready) (acb, priority, roi) == NOTOK)
	return NOTOK;

/* begin Result APDU */
    if ((pe = pe_alloc (PE_CLASS_CONT, PE_FORM_CONS, APDU_RESULT)) == NULLPE
	    || ((acb -> acb_flags & ACB_ACS)
		    ? (p = pe, 0)
		    : set_add (pe, p = pe_alloc (PE_CLASS_UNIV, PE_FORM_CONS,
			PE_CONS_SEQ)) == NOTOK)
	    || seq_add (p, int2prim (invokeID), -1) == NOTOK
	    || ((acb -> acb_flags & ACB_ACS)
		    ? (result
		           && (seq_add (p, q = pe_alloc (PE_CLASS_UNIV,
							 PE_FORM_CONS,
							 PE_CONS_SEQ),
					-1) == NOTOK
			           || seq_add (q, int2prim (op), -1) == NOTOK
			           || seq_add (q, result, -1) == NOTOK))
		    : seq_add (p, result, -1) == NOTOK)) {
	if (pe) {
	    (void) pe_extract (pe, result);
	    pe_free (pe);
	}
	freeacblk (acb);
	return rosaplose (roi, ROS_CONGEST, NULLCP, "out of memory");
    }
/* end Result APDU */

    return (*acb -> acb_putosdu) (acb, pe, result, priority, roi);
}