|
|
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 t
Length: 2609 (0xa31)
Types: TextFile
Names: »tsaplose.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/tsap/tsaplose.c«
/* tsaplose.c - TPM: you lose */
#ifndef lint
static char *rcsid = "$Header: /f/osi/tsap/RCS/tsaplose.c,v 6.0 89/03/18 23:45:36 mrose Rel $";
#endif
/*
* $Header: /f/osi/tsap/RCS/tsaplose.c,v 6.0 89/03/18 23:45:36 mrose Rel $
*
*
* $Log: tsaplose.c,v $
* Revision 6.0 89/03/18 23:45:36 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 <varargs.h>
#include "tpkt.h"
#include "tailor.h"
/* \f
*/
#ifndef lint
int tpktlose (va_alist)
va_dcl
{
int reason,
result;
register struct tsapblk *tb;
struct TSAPdisconnect tds;
register struct TSAPdisconnect *td;
va_list ap;
va_start (ap);
tb = va_arg (ap, struct tsapblk *);
td = va_arg (ap, struct TSAPdisconnect *);
if (td == NULL)
td = &tds;
reason = va_arg (ap, int);
result = _tsaplose (td, reason, ap);
va_end (ap);
if (td -> td_cc > 0) {
SLOG (tsap_log, LLOG_EXCEPTIONS, NULLCP,
("tpktlose [%s] %*.*s", TErrString (td -> td_reason), td -> td_cc,
td -> td_cc, td -> td_data));
}
else
SLOG (tsap_log, LLOG_EXCEPTIONS, NULLCP,
("tpktlose [%s]", TErrString (td -> td_reason)));
(*tb -> tb_losePfnx) (tb, reason, td);
return result;
}
#else
/* VARARGS5 */
int tpktlose (tb, td, reason, what, fmt)
struct tsapblk *tb;
struct TSAPdisconnect *td;
int reason;
char *what,
*fmt;
{
return tpktlose (tb, td, reason, what, fmt);
}
#endif
/* \f
*/
#ifndef lint
int tsaplose (va_alist)
va_dcl
{
int reason,
result;
struct TSAPdisconnect *td;
va_list ap;
va_start (ap);
td = va_arg (ap, struct TSAPdisconnect *);
reason = va_arg (ap, int);
result = _tsaplose (td, reason, ap);
va_end (ap);
return result;
}
#else
/* VARARGS4 */
int tsaplose (td, reason, what, fmt)
struct TSAPdisconnect *td;
int reason;
char *what,
*fmt;
{
return tsaplose (td, reason, what, fmt);
}
#endif
/* \f
*/
#ifndef lint
static int _tsaplose (td, reason, ap) /* what, fmt, args ... */
register struct TSAPdisconnect *td;
int reason;
va_list ap;
{
register char *bp;
char buffer[BUFSIZ];
if (td) {
bzero ((char *) td, sizeof *td);
asprintf (bp = buffer, ap);
bp += strlen (bp);
td -> td_reason = reason;
copyTSAPdata (buffer, bp - buffer, td);
}
return NOTOK;
}
#endif