|
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: 2645 (0xa55) Types: TextFile Names: »ro2ssexec.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/rosap/ro2ssexec.c«
/* ro2ssexec.c - RTPM: exec */ #ifndef lint static char *rcsid = "$Header: /f/osi/rosap/RCS/ro2ssexec.c,v 6.0 89/03/18 23:42:15 mrose Rel $"; #endif /* * $Header: /f/osi/rosap/RCS/ro2ssexec.c,v 6.0 89/03/18 23:42:15 mrose Rel $ * * Based on an TCP-based implementation by George Michaelson of University * College London. * * * $Log: ro2ssexec.c,v $ * Revision 6.0 89/03/18 23:42:15 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 "ropkt.h" #include "isoservent.h" #include "tailor.h" /* \f SERVER only */ int RoExec (ss, roi, arg1, arg2, hook, setperms) struct SSAPstart *ss; char *arg1, *arg2; struct RoSAPindication *roi; 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 (roi); 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 = ROS_CONGEST; } else result = SC_REJECTED, result2 = ROS_PROTOCOL; goto out; } PLOG (rosap_log, print_OACS_PConnect, pe, "PConnect", 1); pe_free (pe); if (acsap_conntype != CN_OPEN) { result = SC_REJECTED, result2 = ROS_ADDRESS; goto out; } if (is = getisoserventbyport ("rosap", (u_short) htons ((u_short) acsap_application))) { *is -> is_tail++ = arg1; *is -> is_tail++ = arg2; *is -> is_tail = NULL; } else { result = SC_REJECTED, result2 = ROS_ADDRESS; goto out; } switch (hook ? (*hook) (is, roi) : 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 (rosap_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 rosaplose (roi, result2, NULLCP, NULLCP); }