+** MARKFAILURE -- mark a failure on a specific address.
+**
+** Parameters:
+** e -- the envelope we are sending.
+** q -- the address to mark.
+** rcode -- the code signifying the particular failure.
+**
+** Returns:
+** none.
+**
+** Side Effects:
+** marks the address (and possibly the envelope) with the
+** failure so that an error will be returned or
+** the message will be queued, as appropriate.
+*/
+
+markfailure(e, q, rcode)
+ register ENVELOPE *e;
+ register ADDRESS *q;
+ int rcode;
+{
+ if (rcode == EX_OK)
+ return;
+ else if (rcode != EX_TEMPFAIL)
+ q->q_flags |= QBADADDR;
+ else if (curtime() > e->e_ctime + TimeOut)
+ {
+ extern char *pintvl();
+
+ if (!bitset(EF_TIMEOUT, e->e_flags))
+ message(Arpa_Info, "Cannot send message for %s",
+ pintvl(TimeOut, FALSE));
+ q->q_flags |= QBADADDR;
+ e->e_flags |= EF_TIMEOUT;
+ }
+ else
+ q->q_flags |= QQUEUEUP;
+}
+\f/*