|
|
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 r
Length: 2672 (0xa70)
Types: TextFile
Names: »rosapresult.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/rosap/rosapresult.c«
/* rosapresult.c - ROPM: result */
#ifndef lint
static char *rcsid = "$Header: /f/osi/rosap/RCS/rosapresult.c,v 7.0 89/11/23 22:21:31 mrose Rel $";
#endif
/*
* $Header: /f/osi/rosap/RCS/rosapresult.c,v 7.0 89/11/23 22:21:31 mrose Rel $
*
* Based on an TCP-based implementation by George Michaelson of University
* College London.
*
*
* $Log: rosapresult.c,v $
* Revision 7.0 89/11/23 22:21:31 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 <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);
}