|
|
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: 3125 (0xc35)
Types: TextFile
Names: »rtsaplose.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/rtsap/rtsaplose.c«
/* rtsaplose.c - RTPM: you lose */
#ifndef lint
static char *rcsid = "$Header: /f/osi/rtsap/RCS/rtsaplose.c,v 7.0 89/11/23 22:22:37 mrose Rel $";
#endif
/*
* $Header: /f/osi/rtsap/RCS/rtsaplose.c,v 7.0 89/11/23 22:22:37 mrose Rel $
*
*
* $Log: rtsaplose.c,v $
* Revision 7.0 89/11/23 22:22:37 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 <varargs.h>
#include "rtpkt.h"
#include "tailor.h"
/* \f
*/
#ifndef lint
int rtpktlose (va_alist)
va_dcl
{
int reason,
result,
value;
register struct assocblk *acb;
register struct RtSAPindication *rti;
register struct RtSAPabort *rta;
va_list ap;
va_start (ap);
acb = va_arg (ap, struct assocblk *);
rti = va_arg (ap, struct RtSAPindication *);
reason = va_arg (ap, int);
result = _rtsaplose (rti, reason, ap);
va_end (ap);
if ((rta = &rti -> rti_abort) -> rta_cc > 0) {
SLOG (rtsap_log, LLOG_EXCEPTIONS, NULLCP,
("rtpktlose [%s] %*.*s", RtErrString (rta -> rta_reason),
rta -> rta_cc, rta -> rta_cc, rta -> rta_data));
}
else
SLOG (rtsap_log, LLOG_EXCEPTIONS, NULLCP,
("rtpktlose [%s]", RtErrString (rta -> rta_reason)));
if (acb == NULLACB
|| acb -> acb_fd == NOTOK
|| acb -> acb_rtpktlose == NULLIFP)
return result;
switch (reason) {
case RTS_PROTOCOL:
value = ABORT_PROTO;
break;
case RTS_CONGEST:
value = ABORT_TMP;
break;
default:
value = ABORT_LSP;
break;
}
(*acb -> acb_rtpktlose) (acb, value);
return result;
}
#else
/* VARARGS5 */
int rtpktlose (acb, rti, reason, what, fmt)
struct assocblk *acb;
struct RtSAPindication *rti;
int reason;
char *what,
*fmt;
{
return rtpktlose (acb, rti, reason, what, fmt);
}
#endif
/* \f
*/
#ifndef lint
int rtsaplose (va_alist)
va_dcl
{
int reason,
result;
struct RtSAPindication *rti;
va_list ap;
va_start (ap);
rti = va_arg (ap, struct RtSAPindication *);
reason = va_arg (ap, int);
result = _rtsaplose (rti, reason, ap);
va_end (ap);
return result;
}
#else
/* VARARGS4 */
int rtsaplose (rti, reason, what, fmt)
struct RtSAPindication *rti;
int reason;
char *what,
*fmt;
{
return rtsaplose (rti, reason, what, fmt);
}
#endif
/* \f
*/
#ifndef lint
static int _rtsaplose (rti, reason, ap) /* what, fmt, args ... */
register struct RtSAPindication *rti;
int reason;
va_list ap;
{
register char *bp;
char buffer[BUFSIZ];
register struct RtSAPabort *rta;
if (rti) {
bzero ((char *) rti, sizeof *rti);
rti -> rti_type = RTI_ABORT;
rta = &rti -> rti_abort;
asprintf (bp = buffer, ap);
bp += strlen (bp);
rta -> rta_peer = 0;
rta -> rta_reason = reason;
copyRtSAPdata (buffer, bp - buffer, rta);
}
return NOTOK;
}
#endif