|
|
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: 2548 (0x9f4)
Types: TextFile
Names: »rt2ssexec.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/rtsap/rt2ssexec.c«
/* rt2ssexec.c - RTPM: exec */
#ifndef lint
static char *rcsid = "$Header: /f/osi/rtsap/RCS/rt2ssexec.c,v 7.0 89/11/23 22:22:28 mrose Rel $";
#endif
/*
* $Header: /f/osi/rtsap/RCS/rt2ssexec.c,v 7.0 89/11/23 22:22:28 mrose Rel $
*
*
* $Log: rt2ssexec.c,v $
* Revision 7.0 89/11/23 22:22:28 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 "rtpkt.h"
#include "isoservent.h"
#include "tailor.h"
/* \f
SERVER only */
int RtExec (ss, rti, arg1, arg2, hook, setperms)
struct SSAPstart *ss;
struct RtSAPindication *rti;
char *arg1,
*arg2;
IFP hook,
setperms;
{
int result,
result2;
register struct isoservent *is;
register PE pe;
struct SSAPref ref;
struct SSAPindication sis;
register struct SSAPindication *si = &sis;
missingP (ss);
missingP (rti);
missingP (arg1);
missingP (arg2);
acsap_conntype = CN_OPEN, acsap_data = NULLPE;
if ((pe = ssdu2pe (ss -> ss_data, ss -> ss_cc, NULLCP, &result)) == NULLPE
|| parse_OACS_PConnect (pe, 1, NULLIP, NULLVP, NULLCP) == NOTOK) {
if (pe)
pe_free (pe);
if (result == PS_ERR_NMEM) {
congest: ;
result = SC_CONGESTION, result2 = RTS_CONGEST;
}
else
result = SC_REJECTED, result2 = RTS_PROTOCOL;
goto out;
}
PLOG (rtsap_log, print_OACS_PConnect, pe, "PConnect", 1);
pe_free (pe);
if (acsap_conntype != CN_OPEN) {
result = SC_REJECTED, result2 = RTS_ADDRESS;
goto out;
}
if (is = getisoserventbyport ("rtsap",
(u_short) htons ((u_short) acsap_application))) {
*is -> is_tail++ = arg1;
*is -> is_tail++ = arg2;
*is -> is_tail = NULL;
}
else {
result = SC_REJECTED, result2 = RTS_ADDRESS;
goto out;
}
switch (hook ? (*hook) (is, rti) : OK) {
case NOTOK:
return NOTOK;
case DONE:
return OK;
case OK:
if (setperms)
(void) (*setperms) (is);
(void) execv (*is -> is_vec, is -> is_vec);/* fall */
SLOG (rtsap_log, LLOG_FATAL, *is -> is_vec, ("unable to exec"));
default:
goto congest;
}
out: ;
SSFREE (ss);
bzero ((char *) &ref, sizeof ref);
(void) SConnResponse (ss -> ss_sd, &ref, NULLSA, result, 0, 0,
SERIAL_NONE, NULLCP, 0, si);
return rtsaplose (rti, result2, NULLCP, NULLCP);
}