|
|
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 p
Length: 2461 (0x99d)
Types: TextFile
Names: »psaprelease1.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/psap2/psaprelease1.c«
/* psaprelease1.c - PPM: initiate release */
#ifndef lint
static char *rcsid = "$Header: /f/osi/psap2/RCS/psaprelease1.c,v 6.1 89/03/23 22:27:47 mrose Exp $";
#endif
/*
* $Header: /f/osi/psap2/RCS/psaprelease1.c,v 6.1 89/03/23 22:27:47 mrose Exp $
*
*
* $Log: psaprelease1.c,v $
* Revision 6.1 89/03/23 22:27:47 mrose
* out-the-door
*
* Revision 6.0 89/03/18 23:40:02 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 "ppkt.h"
/* \f
P-RELEASE.REQUEST */
int PRelRequest (sd, data, ndata, pr, pi)
int sd;
PE *data;
int ndata;
struct PSAPrelease *pr;
struct PSAPindication *pi;
{
SBV smask;
int len,
result;
char *base,
*realbase;
register struct psapblk *pb;
struct SSAPrelease srs;
register struct SSAPrelease *sr = &srs;
struct SSAPindication sis;
register struct SSAPabort *sa = &sis.si_abort;
toomuchP (data, ndata, NPDATA, "release");
missingP (pr);
missingP (pi);
smask = sigioblock ();
psapPsig (pb, sd);
bzero ((char *) sr, sizeof *sr);
switch (result = info2ssdu (pb, pi, data, ndata, &realbase, &base, &len,
"P-RELEASE user-data", PPDU_NONE)) {
case NOTOK:
goto out2;
case OK:
default:
break;
case DONE:
result = NOTOK;
goto out1;
}
if ((result = SRelRequest (pb -> pb_fd, base, len, sr, &sis)) == NOTOK) {
if (sa -> sa_peer) {
(void) ss2psabort (pb, sa, pi);
goto out1;
}
if (SC_FATAL (sa -> sa_reason)) {
(void) ss2pslose (pb, pi, "SRelRequest", sa);
goto out2;
}
else {
(void) ss2pslose (NULLPB, pi, "SRelRequest", sa);
goto out1;
}
}
if ((result = ssdu2info (pb, pi, sr -> sr_data, sr -> sr_cc, pr -> pr_info,
&pr -> pr_ninfo, "P-RELEASE user-data", PPDU_NONE)) == NOTOK)
goto out2;
if (pr -> pr_affirmative = sr -> sr_affirmative) {
pb -> pb_fd = NOTOK;
result = OK;
}
else
result = DONE;
out2: ;
if (result == DONE)
result = OK;
else
freepblk (pb);
out1: ;
SRFREE (sr);
if (realbase)
free (realbase);
else
if (base)
free (base);
(void) sigiomask (smask);
return result;
}