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

⟦7e09bd684⟧ TextFile

    Length: 2092 (0x82c)
    Types: TextFile
    Names: »ryoperation.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/rosy/ryoperation.c« 

TextFile

/* ryoperation.c - ROSY: operations */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/rosy/RCS/ryoperation.c,v 7.0 89/11/23 22:22:02 mrose Rel $";
#endif

/* 
 * $Header: /f/osi/rosy/RCS/ryoperation.c,v 7.0 89/11/23 22:22:02 mrose Rel $
 *
 *
 * $Log:	ryoperation.c,v $
 * Revision 7.0  89/11/23  22:22:02  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 <stdio.h>
#include "rosy.h"


#define	missingP(p) \
{ \
    if (p == NULL) \
	return rosaplose (roi, ROS_PARAMETER, NULLCP, \
			    "mandatory parameter \"%s\" missing", "p"); \
}

/* \f

   OPERATION */

int	RyOperation (sd, ryo, op, in, out, response, roi)
int	sd;
register struct RyOperation *ryo;
int	op,
       *response;
caddr_t	in,
       *out;
struct RoSAPindication *roi;
{
    int     result;

#ifdef	notdef			/* let RyOpInvoke check these as necessary */
    missingP (ryo);
    missingP (in);
#endif
    missingP (out);
    missingP (response);
    missingP (roi);

    switch (result = RyOpInvoke (sd, ryo, op, in, out, NULLIFP, NULLIFP,
				 ROS_SYNC, RyGenID (sd),
				 NULLIP, ROS_NOPRIO, roi)) {
	case NOTOK: 
	    return NOTOK;

	case OK: 
	    switch (roi -> roi_type) {
		case ROI_RESULT: 
		    *response = RY_RESULT;
		    return OK;

		case ROI_ERROR:	/* XXX: hope roe -> roe_error != NOTOK */
		    {
			struct RoSAPerror  *roe = &roi -> roi_error;

			*response = roe -> roe_error;
			return OK;
		    }

		case ROI_UREJECT: 
		    {
			struct RoSAPureject *rou = &roi -> roi_ureject;

			return rosaplose (roi, rou -> rou_reason, NULLCP,
				NULLCP);
		    }

		default: 
		    return rosaplose (roi, ROS_PROTOCOL, NULLCP,
			    "unknown indication type=%d", roi -> roi_type);
	    }

	case DONE: 
	    return DONE;

	default: 
	    return rosaplose (roi, ROS_PROTOCOL, NULLCP,
		    "unknown return from RyInvoke=%d", result);
    }
}