|
|
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 g
Length: 1965 (0x7ad)
Types: TextFile
Names: »gen_probedr.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z«
└─⟦e5a54fb17⟧
└─⟦this⟧ »pp-5.0/Src/submit/gen_probedr.c«
/* gen_probedr.c: generate DRs or NDRs for probes */
# ifndef lint
static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Src/submit/RCS/gen_probedr.c,v 5.0 90/09/20 16:23:05 pp Exp Locker: pp $";
# endif
/*
* $Header: /cs/research/pp/hubris/pp-beta/Src/submit/RCS/gen_probedr.c,v 5.0 90/09/20 16:23:05 pp Exp Locker: pp $
*
* $Log: gen_probedr.c,v $
* Revision 5.0 90/09/20 16:23:05 pp
* rcsforce : 5.0 public release
*
*/
#include "head.h"
#include "q.h"
#include "dr.h"
extern Q_struct Qstruct;
extern char msg_fullpath[];
/* -- local routines -- */
void gen_probedr();
/*---------------------- Begin Routines -------------------------------- */
/* -- Generate NDRs or DRs for submitted probe -- */
void gen_probedr()
{
register Q_struct *qp = &Qstruct;
register ADDR *ad,
*sender;
int found = FALSE;
PP_TRACE (("submit/gen_probedr()"));
/* -- First generate Non Delivery Notifications -- */
for (ad = qp->Raddress; ad != NULLADDR; ad = ad->ad_next) {
if (ad->ad_status != AD_STAT_PEND &&
ad->ad_status != AD_STAT_DRREQUIRED)
continue;
if (rp_isbad (ad->ad_parse_stat) ||
ad -> ad_status == AD_STAT_DRREQUIRED)
found = TRUE;
if (ad -> ad_fmtchan) {
list_rchan_free (ad -> ad_fmtchan);
ad -> ad_fmtchan = NULLIST_RCHAN;
}
}
if (found )
gen_ndr();
/* -- Secondly Generate Delivery Notifications -- */
sender = qp->Oaddress;
if (qp -> queuetime == NULLUTC)
qp -> queuetime = utcnow();
for (ad=qp->Raddress, found=FALSE; ad != NULLADDR; ad = ad->ad_next) {
if (ad->ad_status != AD_STAT_PEND)
continue;
if (ad->ad_outchan->li_chan->ch_probe)
continue;
found = TRUE;
ad->ad_type = sender->ad_type;
ad->ad_status = AD_STAT_DRREQUIRED;
ad -> ad_reason = DRR_NO_REASON;
}
if (found)
if (wr_q2drsubmit (qp, msg_fullpath) != RP_OK)
PP_LOG (LLOG_EXCEPTIONS, ("wr_q2drsubmit failed"));
return;
}